Code

Merge branch 'maint-1.7.6' into maint-1.7.7
[git.git] / t / t3200-branch.sh
index cb6458d1c820bd131af4659fe878ff9406fbbcac..7633930bb472e1c9aebf2799f3eaf3bc53c7263c 100755 (executable)
@@ -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