From f621a8454d19d17fe46e6951b7e3d22bebd92aba Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Wed, 5 Aug 2009 09:59:20 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- t/t6010-merge-base.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 't') diff --git a/t/t6010-merge-base.sh b/t/t6010-merge-base.sh index 79124ec76..0144d9e85 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 && -- cgit v1.2.1