From: David Aguilar <davvid@gmail.com>
To: Fernando Ramos <greenfoo@u92.eu>
Cc: "Git Mailing List" <git@vger.kernel.org>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>,
"Eric Sunshine" <sunshine@sunshineco.com>,
"Seth House" <seth@eseth.com>,
levraiphilippeblain@gmail.com, rogi@skylittlesystem.org
Subject: Re: [PATCH v4 2/3] vimdiff: add tool documentation
Date: Thu, 9 Dec 2021 18:58:58 -0800 [thread overview]
Message-ID: <CAJDDKr77YQKJj15V52Rs=LPRMZVSkbpV8MWFDWNuYf4jqqCajg@mail.gmail.com> (raw)
In-Reply-To: <20211204090351.42369-3-greenfoo@u92.eu>
On Sat, Dec 4, 2021 at 1:04 AM Fernando Ramos <greenfoo@u92.eu> wrote:
>
> Running 'git {merge,diff}tool --tool-help' now also prints usage
> information about the vimdiff tool (and its variantes) instead of just
> its name.
>
> Two new functions ('diff_cmd_help()' and 'merge_cmd_help()') have been
> added to the set of functions that each merge tool (ie. scripts found
> inside "mergetools/") can overwrite to provided tool specific
> information.
>
> Right now, only 'mergetools/vimdiff' implements these functions, but
> other tools are encouraged to do so in the future, specially if they
> take configuration options not explained anywhere else (as it is the
> case with the 'vimdiff' tool and the new 'layout' option)
>
> Signed-off-by: Fernando Ramos <greenfoo@u92.eu>
> ---
> Documentation/git-difftool--vimdiff.txt | 40 +++++
> Documentation/git-mergetool--vimdiff.txt | 195 +++++++++++++++++++++++
> git-mergetool--lib.sh | 14 ++
> mergetools/vimdiff | 12 ++
> 4 files changed, 261 insertions(+)
> create mode 100644 Documentation/git-difftool--vimdiff.txt
> create mode 100644 Documentation/git-mergetool--vimdiff.txt
Should these be referenced from elsewhere in the Documentation/
tree in order to make them more discoverable?
Documentation/git-{difftool,mergetool}.txt seem like they should
include or link to these.
> diff --git a/mergetools/vimdiff b/mergetools/vimdiff
> index 5bf77a5388..db6cb75728 100644
> --- a/mergetools/vimdiff
> +++ b/mergetools/vimdiff
> @@ -364,6 +364,12 @@ diff_cmd () {
> }
>
>
> +diff_cmd_help() {
> + echo "Run 'man git-difftool--vimdiff' for details"
> + return 0
> +}
> +
> +
> merge_cmd () {
> layout=$(git config mergetool.$merge_tool.layout)
>
> @@ -435,6 +441,12 @@ merge_cmd () {
> }
>
>
> +merge_cmd_help() {
> + echo "Run 'man git-mergetool--vimdiff' for details"
> + return 0
> +}
> +
> +
> translate_merge_tool_path() {
> case "$1" in
> nvimdiff*)
> --
My understanding is that we prefer "git help" instead of "man" when
providing hints.
That means we should suggest something like this instead:
echo "Run 'git help mergetool--vimdiff' for details"
--
David
next prev parent reply other threads:[~2021-12-10 2:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-04 9:03 [PATCH v4 0/3] vimdiff: new implementation with layout support Fernando Ramos
2021-12-04 9:03 ` [PATCH v4 1/3] " Fernando Ramos
2021-12-04 9:03 ` [PATCH v4 2/3] vimdiff: add tool documentation Fernando Ramos
2021-12-10 2:58 ` David Aguilar [this message]
2021-12-10 21:47 ` Junio C Hamano
2021-12-11 10:46 ` Fernando Ramos
2022-01-04 20:38 ` Fernando Ramos
2021-12-04 9:03 ` [PATCH v4 3/3] vimdiff: integrate layout tests in the unit tests framework ('t' folder) Fernando Ramos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJDDKr77YQKJj15V52Rs=LPRMZVSkbpV8MWFDWNuYf4jqqCajg@mail.gmail.com' \
--to=davvid@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=greenfoo@u92.eu \
--cc=levraiphilippeblain@gmail.com \
--cc=rogi@skylittlesystem.org \
--cc=seth@eseth.com \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).