summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-01-10 18:33:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-01-10 18:33:36 (GMT)
commit3b9d69ec22b8821fecc44c07ea49adc749484335 (patch)
tree89993616989d8d5a43cbcf5a39ac651c70a2272f /t
parentf0f493ec58489c739839e8d257a04159889639c6 (diff)
parente228c1736f25c59cd6da51ed97e03ecd80a935e6 (diff)
downloadgit-3b9d69ec22b8821fecc44c07ea49adc749484335.zip
git-3b9d69ec22b8821fecc44c07ea49adc749484335.tar.gz
git-3b9d69ec22b8821fecc44c07ea49adc749484335.tar.bz2
Merge branch 'js/lift-parent-count-limit'
There is no reason to have a hardcoded upper limit of the number of parents for an octopus merge, created via the graft mechanism. * js/lift-parent-count-limit: Remove the line length limit for graft files
Diffstat (limited to 't')
-rw-r--r--t/annotate-tests.sh21
-rwxr-xr-xt/t6101-rev-parse-parents.sh16
2 files changed, 36 insertions, 1 deletions
diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh
index c9d105d..304c7b7 100644
--- a/t/annotate-tests.sh
+++ b/t/annotate-tests.sh
@@ -116,6 +116,27 @@ test_expect_success 'blame evil merge' '
check_count A 2 B 1 B1 2 B2 1 "A U Thor" 1
'
+test_expect_success 'blame huge graft' '
+ test_when_finished "git checkout branch2" &&
+ test_when_finished "rm -f .git/info/grafts" &&
+ graft= &&
+ for i in 0 1 2
+ do
+ for j in 0 1 2 3 4 5 6 7 8 9
+ do
+ git checkout --orphan "$i$j" &&
+ printf "%s\n" "$i" "$j" >file &&
+ test_tick &&
+ GIT_AUTHOR_NAME=$i$j GIT_AUTHOR_EMAIL=$i$j@test.git \
+ git commit -a -m "$i$j" &&
+ commit=$(git rev-parse --verify HEAD) &&
+ graft="$graft$commit "
+ done
+ done &&
+ printf "%s " $graft >.git/info/grafts &&
+ check_count -h 00 01 1 10 1
+'
+
test_expect_success 'setup incomplete line' '
echo "incomplete" | tr -d "\\012" >>file &&
GIT_AUTHOR_NAME="C" GIT_AUTHOR_EMAIL="C@test.git" \
diff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh
index 7ea14ce..10b1452 100755
--- a/t/t6101-rev-parse-parents.sh
+++ b/t/t6101-rev-parse-parents.sh
@@ -20,7 +20,17 @@ test_expect_success 'setup' '
test_commit start2 &&
git checkout master &&
git merge -m next start2 &&
- test_commit final
+ test_commit final &&
+
+ test_seq 40 |
+ while read i
+ do
+ git checkout --orphan "b$i" &&
+ test_tick &&
+ git commit --allow-empty -m "$i" &&
+ commit=$(git rev-parse --verify HEAD) &&
+ printf "$commit " >>.git/info/grafts
+ done
'
test_expect_success 'start is valid' '
@@ -79,6 +89,10 @@ test_expect_success 'final^1^! = final^1 ^final^1^1 ^final^1^2' '
test_cmp expect actual
'
+test_expect_success 'large graft octopus' '
+ test_cmp_rev_output b31 "git rev-parse --verify b1^30"
+'
+
test_expect_success 'repack for next test' '
git repack -a -d
'