Skip to content

Commit 7cc763a

Browse files
pcloudsgitster
authored andcommitted
completion: fix completing merge strategies on non-C locales
The anchor string "Available strategies are:" is translatable so __git_list_merge_strategies may fail to collect available strategies from 'git merge' on non-C locales. Force C locale on this command. Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8279ed0 commit 7cc763a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ __git_is_configured_remote ()
594594

595595
__git_list_merge_strategies ()
596596
{
597-
git merge -s help 2>&1 |
597+
LANG=C LC_ALL=C git merge -s help 2>&1 |
598598
sed -n -e '/[Aa]vailable strategies are: /,/^$/{
599599
s/\.$//
600600
s/.*://

0 commit comments

Comments
 (0)