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

contrib/completion/git-completion.bash
index 0492db924bb63b88a0e8d97cd29c60ae02fd8fcc..1b43329ed79bfb09eac7a017c5ab7466fedc497b 100644 (file)
@@ -875,11 +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
                        "
                ;;
        *)