Merge branch 'nd/completion-negation'
authorJunio C Hamano <gitster@pobox.com>
Tue, 6 Nov 2018 06:50:19 +0000 (15:50 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 Nov 2018 06:50:20 +0000 (15:50 +0900)
The command line completion machinery (in contrib/) has been
updated to allow the completion script to tweak the list of options
that are reported by the parse-options machinery correctly.

* nd/completion-negation:
completion: fix __gitcomp_builtin no longer consider extra options

contrib/completion/git-completion.bash
index 86b8f474c8d5af0e5a948b835ba104fd963cbff5..e9647a103a220a8cbd73096b37d0fb54ccc133d9 100644 (file)
@@ -400,7 +400,7 @@ __gitcomp_builtin ()
        if [ -z "$options" ]; then
                # leading and trailing spaces are significant to make
                # option removal work correctly.
-               options=" $(__git ${cmd/_/ } --git-completion-helper) $incl "
+               options=" $incl $(__git ${cmd/_/ } --git-completion-helper) "
                for i in $excl; do
                        options="${options/ $i / }"
                done