aboutsummaryrefslogtreecommitdiff
path: root/t/t7201-co.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-27 13:02:57 -0800
committerJunio C Hamano <gitster@pobox.com>2008-02-27 13:02:57 -0800
commit60b188a9844cdcf865174c685a38acc053a9d43b (patch)
treeb2ad8b5b4b20785ea137fa0ec5a11cb0b8517d8c /t/t7201-co.sh
parent5a4d707a6d914fcea302e299fc18892d9e42c767 (diff)
parent572fc81d21b26d856dd3c2cc366b7452a4ed16e4 (diff)
downloadgit-60b188a9844cdcf865174c685a38acc053a9d43b.tar.gz
git-60b188a9844cdcf865174c685a38acc053a9d43b.tar.xz
Merge branch 'js/branch-track'
* js/branch-track: doc: documentation update for the branch track changes branch: optionally setup branch.*.merge from upstream local branches Conflicts: Documentation/config.txt Documentation/git-branch.txt Documentation/git-checkout.txt builtin-branch.c cache.h t/t7201-co.sh
Diffstat (limited to 't/t7201-co.sh')
-rwxr-xr-xt/t7201-co.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index 724adef0b..63915cd87 100755
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
@@ -313,4 +313,28 @@ test_expect_success 'checkout specific path while in subdirectory' '
'
+test_expect_success \
+ 'checkout w/--track sets up tracking' '
+ git config branch.autosetupmerge false &&
+ git checkout master &&
+ git checkout --track -b track1 &&
+ test "$(git config branch.track1.remote)" &&
+ test "$(git config branch.track1.merge)"'
+
+test_expect_success \
+ 'checkout w/autosetupmerge=always sets up tracking' '
+ git config branch.autosetupmerge always &&
+ git checkout master &&
+ git checkout -b track2 &&
+ test "$(git config branch.track2.remote)" &&
+ test "$(git config branch.track2.merge)"
+ git config branch.autosetupmerge false'
+
+test_expect_success \
+ 'checkout w/--track from non-branch HEAD fails' '
+ git checkout -b delete-me master &&
+ rm .git/refs/heads/delete-me &&
+ test refs/heads/delete-me = "$(git symbolic-ref HEAD)" &&
+ !(git checkout --track -b track)'
+
test_done