From: Junio C Hamano Date: Tue, 16 May 2017 02:51:53 +0000 (+0900) Subject: Merge branch 'sk/status-short-branch-color-config' X-Git-Tag: v2.14.0-rc0~192 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3900254bf29e00ad72de7a5b8e354369b2b84245?hp=-c Merge branch 'sk/status-short-branch-color-config' 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 --- 3900254bf29e00ad72de7a5b8e354369b2b84245 diff --combined contrib/completion/git-completion.bash index af658995d5,72c6d58965..e77498dd9c --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@@ -28,14 -28,6 +28,14 @@@ # 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