summaryrefslogtreecommitdiff
path: root/t/t6010-merge-base.sh
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2009-08-05 07:59:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-08-05 17:29:37 (GMT)
commitf621a8454d19d17fe46e6951b7e3d22bebd92aba (patch)
treeaae7fd662daff4819773be4deee37e564c4a0bdf /t/t6010-merge-base.sh
parent995bdc73fe0e28d622af0897440f0ea298345585 (diff)
downloadgit-f621a8454d19d17fe46e6951b7e3d22bebd92aba.zip
git-f621a8454d19d17fe46e6951b7e3d22bebd92aba.tar.gz
git-f621a8454d19d17fe46e6951b7e3d22bebd92aba.tar.bz2
git-merge-base/git-show-branch --merge-base: Documentation and test
Currently, the documentation suggests that 'git merge-base -a' and 'git show-branch --merge-base' are equivalent (in fact it claims that the former cannot handle more than two revs). Alas, the handling of more than two revs is very different. Document this by tests and correct the documentation to reflect this. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6010-merge-base.sh')
-rwxr-xr-xt/t6010-merge-base.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t6010-merge-base.sh b/t/t6010-merge-base.sh
index 79124ec..0144d9e 100755
--- a/t/t6010-merge-base.sh
+++ b/t/t6010-merge-base.sh
@@ -149,6 +149,12 @@ test_expect_success 'merge-base A B C' '
test "$MM1" = "$MB"
'
+test_expect_success 'merge-base A B C using show-branch' '
+ MB=$(git show-branch --merge-base MMA MMB MMC) &&
+ MMR=$(git rev-parse --verify MMR) &&
+ test "$MMR" = "$MB"
+'
+
test_expect_success 'criss-cross merge-base for octopus-step (setup)' '
git reset --hard MMR &&
test_tick && git commit --allow-empty -m 1 && git tag CC1 &&