Merge branch 'ab/clone-no-tags'
authorJunio C Hamano <gitster@pobox.com>
Tue, 16 May 2017 02:51:54 +0000 (11:51 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 16 May 2017 02:51:54 +0000 (11:51 +0900)
"git clone" learned the "--no-tags" option not to fetch all tags
initially, and also set up the tagopt not to follow any tags in
subsequent fetches.

* ab/clone-no-tags:
tests: rename a test having to do with shallow submodules
clone: add a --no-tags option to clone without tags
tests: change "cd ... && git fetch" to "cd &&\n\tgit fetch"

1  2 
contrib/completion/git-completion.bash
index e77498dd9c51603b86e65efe11dba97fac3cd400,6da997cf426666019368162972f1a8e84fe28b29..1ed0a09feef51ae606dbc2d7aa1944a49c6c28ee
  # 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 ;;
@@@ -717,7 -709,6 +717,7 @@@ __git_complete_remote_or_refspec (
                i="${words[c]}"
                case "$i" in
                --mirror) [ "$cmd" = "push" ] && no_complete_refspec=1 ;;
 +              -d|--delete) [ "$cmd" = "push" ] && lhs=0 ;;
                --all)
                        case "$cmd" in
                        push) no_complete_refspec=1 ;;
@@@ -1257,8 -1248,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
@@@ -1319,6 -1309,7 +1319,7 @@@ _git_clone (
                        --template=
                        --depth
                        --single-branch
+                       --no-tags
                        --branch
                        --recurse-submodules
                        --no-single-branch
@@@ -2387,9 -2378,7 +2388,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