diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2008-06-27 19:06:26 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-06-30 22:45:51 -0700 |
commit | 5948e2ae27d936f7737f4d7433ca6c0b879fe4c8 (patch) | |
tree | 7fd2857a31fb6c6fbcda2a4951d8bfd932e6f6bd | |
parent | 5240c9d75d8e1b747da427ba6320432d3201168a (diff) | |
download | git-5948e2ae27d936f7737f4d7433ca6c0b879fe4c8.tar.gz git-5948e2ae27d936f7737f4d7433ca6c0b879fe4c8.tar.xz |
Add new test to ensure git-merge handles more than 25 refs.
The old shell version handled only 25 refs but we no longer have this
limitation. Add a test to make sure this limitation will not be
introduced again in the future.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | t/t7602-merge-octopus-many.sh | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/t/t7602-merge-octopus-many.sh b/t/t7602-merge-octopus-many.sh new file mode 100755 index 000000000..f3a4bb2ea --- /dev/null +++ b/t/t7602-merge-octopus-many.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +test_description='git-merge + +Testing octopus merge with more than 25 refs.' + +. ./test-lib.sh + +test_expect_success 'setup' ' + echo c0 > c0.c && + git add c0.c && + git commit -m c0 && + git tag c0 && + i=1 && + while test $i -le 30 + do + git reset --hard c0 && + echo c$i > c$i.c && + git add c$i.c && + git commit -m c$i && + git tag c$i && + i=`expr $i + 1` || return 1 + done +' + +test_expect_failure 'merge c1 with c2, c3, c4, ... c29' ' + git reset --hard c1 && + i=2 && + refs="" && + while test $i -le 30 + do + refs="$refs c$i" + i=`expr $i + 1` + done + git merge $refs && + test "$(git rev-parse c1)" != "$(git rev-parse HEAD)" && + i=1 && + while test $i -le 30 + do + test "$(git rev-parse c$i)" = "$(git rev-parse HEAD^$i)" && + i=`expr $i + 1` || return 1 + done && + git diff --exit-code && + i=1 && + while test $i -le 30 + do + test -f c$i.c && + i=`expr $i + 1` || return 1 + done +' + +test_done |