summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-09-23 14:16:22 -0700
committerJunio C Hamano <gitster@pobox.com>2011-09-23 14:16:22 -0700
commit503359f13abc251ecbcd6a135918efbc58a4e6f6 (patch)
tree514086a43e1247efa9a31265557440ec8f2d5c01 /t
parent40ffc49876611150104102d59a35d865e4670bd7 (diff)
parente9d4f7405b6ab399ef0ea62a796c646de676555d (diff)
downloadgit-503359f13abc251ecbcd6a135918efbc58a4e6f6.tar.gz
Merge branch 'mg/branch-set-upstream-previous' into maint
* mg/branch-set-upstream-previous: branch.c: use the parsed branch name
Diffstat (limited to 't')
-rwxr-xr-xt/t6040-tracking-info.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t6040-tracking-info.sh b/t/t6040-tracking-info.sh
index a9b0ac1efc..19de5b16eb 100755
--- a/t/t6040-tracking-info.sh
+++ b/t/t6040-tracking-info.sh
@@ -110,4 +110,18 @@ test_expect_success '--set-upstream does not change branch' '
grep -q "^refs/heads/master$" actual &&
cmp expect2 actual2
'
+
+test_expect_success '--set-upstream @{-1}' '
+ git checkout from-master &&
+ git checkout from-master2 &&
+ git config branch.from-master2.merge > expect2 &&
+ git branch --set-upstream @{-1} follower &&
+ git config branch.from-master.merge > actual &&
+ git config branch.from-master2.merge > actual2 &&
+ git branch --set-upstream from-master follower &&
+ git config branch.from-master.merge > expect &&
+ test_cmp expect2 actual2 &&
+ test_cmp expect actual
+'
+
test_done