Merge branch 'cn/branch-set-upstream-to'
authorJunio C Hamano <gitster@pobox.com>
Sat, 15 Sep 2012 04:39:47 +0000 (21:39 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 15 Sep 2012 04:39:48 +0000 (21:39 -0700)
Finishing touches to the recently graduated topic to introduce
"git branch --set-upstream-to" option.

* cn/branch-set-upstream-to:
completion: complete branch name for "branch --set-upstream-to="
completion: add --set-upstream-to and --unset-upstream

1  2 
contrib/completion/git-completion.bash
index 0492db924bb63b88a0e8d97cd29c60ae02fd8fcc,e48cf8001241502e9dc4310895b136f8c7534e6b..1b43329ed79bfb09eac7a017c5ab7466fedc497b
@@@ -875,11 -875,15 +875,15 @@@ _git_branch (
        done
  
        case "$cur" in
+       --set-upstream-to=*)
+               __gitcomp "$(__git_refs)" "" "${cur##--set-upstream-to=}"
+               ;;
        --*)
                __gitcomp "
                        --color --no-color --verbose --abbrev= --no-abbrev
                        --track --no-track --contains --merged --no-merged
-                       --set-upstream --edit-description --list
+                       --set-upstream-to= --edit-description --list
+                       --unset-upstream
                        "
                ;;
        *)
@@@ -1071,7 -1075,7 +1075,7 @@@ _git_diff (
  }
  
  __git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff
 -                      tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3
 +                      tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3 codecompare
  "
  
  _git_difftool ()
@@@ -2032,7 -2036,7 +2036,7 @@@ _git_config (
  
  _git_remote ()
  {
 -      local subcommands="add rename rm set-head set-branches set-url show prune update"
 +      local subcommands="add rename remove set-head set-branches set-url show prune update"
        local subcommand="$(__git_find_on_cmdline "$subcommands")"
        if [ -z "$subcommand" ]; then
                __gitcomp "$subcommands"
        fi
  
        case "$subcommand" in
 -      rename|rm|set-url|show|prune)
 +      rename|remove|set-url|show|prune)
                __gitcomp_nl "$(__git_remotes)"
                ;;
        set-head|set-branches)