diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-02-27 13:02:57 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-27 13:02:57 -0800 |
commit | 60b188a9844cdcf865174c685a38acc053a9d43b (patch) | |
tree | b2ad8b5b4b20785ea137fa0ec5a11cb0b8517d8c /t/t7201-co.sh | |
parent | 5a4d707a6d914fcea302e299fc18892d9e42c767 (diff) | |
parent | 572fc81d21b26d856dd3c2cc366b7452a4ed16e4 (diff) | |
download | git-60b188a9844cdcf865174c685a38acc053a9d43b.tar.gz |
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-x | t/t7201-co.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t7201-co.sh b/t/t7201-co.sh index 724adef0bf..63915cd87b 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 |