1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-02 09:26:10 +02:00

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 <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Duy Nguyen 2018-01-26 08:31:42 +07:00 committed by Junio C Hamano
parent 8279ed033f
commit 7cc763aaa3

View File

@ -594,7 +594,7 @@ __git_is_configured_remote ()
__git_list_merge_strategies ()
{
git merge -s help 2>&1 |
LANG=C LC_ALL=C git merge -s help 2>&1 |
sed -n -e '/[Aa]vailable strategies are: /,/^$/{
s/\.$//
s/.*://