git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 2/3] vimdiff: add tool documentation

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Dec 1, 2021, 21:27 UTC
Message-ID
<211201.86ee6w9fq8.gmgdl@evledraar.gmail.com>
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:
Show 52 quoted lines
> +	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"?

Previous: Fernando RamosNext: Fernando Ramos
Message 4 of 9 in “vimdiff: new implementation with layout support”
  1. 0/3 vimdiff: new implementation with layout supportFernando Ramos, Nov 30, 2021
  2. 1/3 vimdiff: new implementation with layout supportFernando Ramos, Nov 30, 2021
  3. 2/3 vimdiff: add tool documentationFernando Ramos, Nov 30, 2021
  4. Ævar Arnfjörð BjarmasonDec 1, 2021
  5. Fernando RamosDec 4, 2021
  6. 3/3 vimdiff: integrate layout tests in the unit tests framework ('t' folder)Fernando Ramos, Nov 30, 2021
  7. Ævar Arnfjörð BjarmasonDec 1, 2021
  8. Eric SunshineDec 1, 2021
  9. Fernando RamosDec 1, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.