Merge branch 'sk/status-short-branch-color-config'
authorJunio C Hamano <gitster@pobox.com>
Tue, 16 May 2017 02:51:53 +0000 (11:51 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 16 May 2017 02:51:53 +0000 (11:51 +0900)
The colors in which "git status --short --branch" showed the names
of the current branch and its remote-tracking branch are now
configurable.

* sk/status-short-branch-color-config:
status: add color config slots for branch info in "--short --branch"
status: fix missing newline when comment chars are disabled

1  2 
contrib/completion/git-completion.bash
index af658995d55025418c94061842f8d84809b27ef0,72c6d5896550724a7750fed906ca242ae27b9463..e77498dd9c51603b86e65efe11dba97fac3cd400
  # completion style.  For example '!f() { : git commit ; ... }; f' will
  # tell the completion to use commit completion.  This also works with aliases
  # of form "!sh -c '...'".  For example, "!sh -c ': git commit ; ... '".
 +#
 +# You can set the following environment variables to influence the behavior of
 +# the completion routines:
 +#
 +#   GIT_COMPLETION_CHECKOUT_NO_GUESS
 +#
 +#     When set to "1", do not include "DWIM" suggestions in git-checkout
 +#     completion (e.g., completing "foo" when "origin/foo" exists).
  
  case "$COMP_WORDBREAKS" in
  *:*) : great ;;
@@@ -1257,8 -1249,7 +1257,8 @@@ _git_checkout (
                # check if --track, --no-track, or --no-guess was specified
                # if so, disable DWIM mode
                local flags="--track --no-track --no-guess" track_opt="--track"
 -              if [ -n "$(__git_find_on_cmdline "$flags")" ]; then
 +              if [ "$GIT_COMPLETION_CHECKOUT_NO_GUESS" = "1" ] ||
 +                 [ -n "$(__git_find_on_cmdline "$flags")" ]; then
                        track_opt=''
                fi
                __git_complete_refs $track_opt
@@@ -2387,7 -2378,9 +2387,9 @@@ _git_config (
                color.status.added
                color.status.changed
                color.status.header
+               color.status.localBranch
                color.status.nobranch
+               color.status.remoteBranch
                color.status.unmerged
                color.status.untracked
                color.status.updated