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.