git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Fernando Ramos <greenfoo@u92.eu>
Cc: git@vger.kernel.org, gitster@pobox.com, davvid@gmail.com,
	sunshine@sunshineco.com, seth@eseth.com,
	levraiphilippeblain@gmail.com, rogi@skylittlesystem.org
Subject: Re: [PATCH v3 2/3] vimdiff: add tool documentation
Date: Wed, 01 Dec 2021 22:27:42 +0100	[thread overview]
Message-ID: <211201.86ee6w9fq8.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <20211130204333.174967-3-greenfoo@u92.eu>


> +                                (diff_mode && diff_cmd_help "$toolname" || merge_cmd_help "$toolname") |

Mis-indenting with spaces v.s. tabs below.

Then this:

> +	diff_cmd_help () {
> +		return 0
> +	}
> +
>  	merge_cmd () {
>  		return 1
>  	}
>  
> +	merge_cmd_help () {
> +		return 0
> +	}
> +
>  	hide_resolved_enabled () {
>  		return 0
>  	}
> diff --git a/mergetools/vimdiff b/mergetools/vimdiff
> index ed0d8584f7..8614253ef1 100644
> --- a/mergetools/vimdiff
> +++ b/mergetools/vimdiff
> @@ -462,6 +462,17 @@ diff_cmd () {
>  }
>  
>  
> +diff_cmd_help() {
> +	case "$1" in
> +	*)
> +		echo "Run 'man git-difftool--vimdiff' for details"
> +		;;
> +	esac
> +
> +	return 0
> +}
> +
> +
>  merge_cmd () {
>  	layout=$(git config mergetool.$merge_tool.layout)
>  
> @@ -533,6 +544,17 @@ merge_cmd () {
>  }
>  
>  
> +merge_cmd_help() {
> +	case "$1" in
> +	*)
> +		echo "Run 'man git-mergetool--vimdiff' for details"
> +		;;
> +	esac
> +
> +	return 0
> +}
> +
> +

Isn't the case/esac in those functions entirely redundant and they could
just "echo"?

  reply	other threads:[~2021-12-01 21:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 20:43 [PATCH v3 0/3] vimdiff: new implementation with layout support Fernando Ramos
2021-11-30 20:43 ` [PATCH v3 1/3] " Fernando Ramos
2021-11-30 20:43 ` [PATCH v3 2/3] vimdiff: add tool documentation Fernando Ramos
2021-12-01 21:27   ` Ævar Arnfjörð Bjarmason [this message]
2021-12-04  8:31     ` Fernando Ramos
2021-11-30 20:43 ` [PATCH v3 3/3] vimdiff: integrate layout tests in the unit tests framework ('t' folder) Fernando Ramos
2021-12-01 21:25   ` Ævar Arnfjörð Bjarmason
2021-12-01  5:03 ` [PATCH v3 0/3] vimdiff: new implementation with layout support Eric Sunshine
2021-12-01 18:49   ` 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=211201.86ee6w9fq8.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=davvid@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).