diff options
| author | Junio C Hamano <gitster@pobox.com> | 2011-11-10 09:10:51 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2011-11-10 09:10:51 -0800 |
| commit | c444c16589f95ac22d8e3ffe603cd7f0613512ce (patch) | |
| tree | 31d2e0c2a77344201af6f3ee5427f47218dec9bb /t/t2012-checkout-last.sh | |
| parent | 77f143bf3e218857ec8e5244d7e862e8e0c1a041 (diff) | |
| parent | 81b50f3ce40bfdd66e5d967bf82be001039a9a98 (diff) | |
| download | git-c444c16589f95ac22d8e3ffe603cd7f0613512ce.tar.gz | |
Merge "Move 'builtin-*' into a 'builtin/' subdirectory"
Diffstat (limited to 't/t2012-checkout-last.sh')
| -rwxr-xr-x | t/t2012-checkout-last.sh | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/t/t2012-checkout-last.sh b/t/t2012-checkout-last.sh index 87b30a268c..b44de9dc62 100755 --- a/t/t2012-checkout-last.sh +++ b/t/t2012-checkout-last.sh @@ -1,6 +1,6 @@ #!/bin/sh -test_description='checkout can switch to last branch' +test_description='checkout can switch to last branch and merge base' . ./test-lib.sh @@ -91,4 +91,29 @@ test_expect_success 'switch to twelfth from the last' ' test "z$(git symbolic-ref HEAD)" = "zrefs/heads/branch13" ' +test_expect_success 'merge base test setup' ' + git checkout -b another other && + echo "hello again" >>world && + git add world && + git commit -m third +' + +test_expect_success 'another...master' ' + git checkout another && + git checkout another...master && + test "z$(git rev-parse --verify HEAD)" = "z$(git rev-parse --verify master^)" +' + +test_expect_success '...master' ' + git checkout another && + git checkout ...master && + test "z$(git rev-parse --verify HEAD)" = "z$(git rev-parse --verify master^)" +' + +test_expect_success 'master...' ' + git checkout another && + git checkout master... && + test "z$(git rev-parse --verify HEAD)" = "z$(git rev-parse --verify master^)" +' + test_done |
