diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-09-16 21:48:10 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-09-16 21:48:10 -0700 |
commit | c103e9529c8a95b5acf4747cfe06b2f6adedab71 (patch) | |
tree | c57aadfd0da7010b5a916e21dd3b4d239b28ac62 /t | |
parent | 26e4266f2fee3454370885ff480b38d045ca1731 (diff) | |
parent | fa79937675600ad5dda5031c532097a0461d843e (diff) | |
download | git-c103e9529c8a95b5acf4747cfe06b2f6adedab71.tar.gz |
Merge branch 'ci/forbid-unwanted-current-branch-update'
* ci/forbid-unwanted-current-branch-update:
branch --set-upstream: regression fix
Diffstat (limited to 't')
-rwxr-xr-x | t/t3200-branch.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index cb6458d1c8..7633930bb4 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -554,4 +554,17 @@ test_expect_success 'attempt to delete a branch merged to its base' ' test_must_fail git branch -d my10 ' +test_expect_success 'use set-upstream on the current branch' ' + git checkout master && + git --bare init myupstream.git && + git push myupstream.git master:refs/heads/frotz && + git remote add origin myupstream.git && + git fetch && + git branch --set-upstream master origin/frotz && + + test "z$(git config branch.master.remote)" = "zorigin" && + test "z$(git config branch.master.merge)" = "zrefs/heads/frotz" + +' + test_done |