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

Re: [PATCH] merge: support --strategy '?' for git-completion.bash

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 25, 2018, 18:49 UTC
Message-ID
<xmqqo9lhai46.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20180125094031.6584-1-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
Show 12 quoted lines
> Bash completion support gets the list of available strategies with a
> grep and sed trick which does not work on non-C locale since the anchor
> string is translated and it does not cover custom strategies either.
>
> Let's do it a better way and make git-merge provide all available
> strategies in machine-readable form.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
>  Another, perhaps better, option is add "git merge --list-strategies".
>  It requires some code movement, so I'll try with a simpler approach
>  first.

If you run the probing "merge -s help" under C locale, that would just be a one-liner, no ;-) I.e.

> -	git merge -s help 2>&1 |
> +	LANG=C LC_ALL=C git merge -s help 2>&1 |
Not rejecting the patch, but just wondering.
Previous: Nguyễn Thái Ngọc DuyNext: Duy Nguyen
Message 2 of 4 in “merge: support --strategy '?' for git-completion.bash”
  1. merge: support --strategy '?' for git-completion.bashNguyễn Thái Ngọc Duy, Jan 25, 2018
  2. Junio C HamanoJan 25, 2018
  3. Duy NguyenJan 26, 2018
  4. Junio C HamanoJan 26, 2018

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.