aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-02-08 15:29:07 -0800
committerJunio C Hamano <gitster@pobox.com>2013-02-08 15:29:07 -0800
commit4dd7c77d19d42f6981ba4cdcda91755e5587cc28 (patch)
tree0003225d8e58ad22ce7f23beb9d5c98df4518369 /t
parentecf6778e8ef243dd9b34eef57212c44baffb13a2 (diff)
parentedbc00e76d29213010db947d8d7bff3baab12a35 (diff)
downloadgit-4dd7c77d19d42f6981ba4cdcda91755e5587cc28.tar.gz
git-4dd7c77d19d42f6981ba4cdcda91755e5587cc28.tar.xz
Merge branch 'jc/combine-diff-many-parents'
We used to have an arbitrary 32 limit for combined diff input, resulting in incorrect number of leading colons shown when showing the "--raw --cc" output. * jc/combine-diff-many-parents: t4038: add tests for "diff --cc --raw <trees>" combine-diff: lift 32-way limit of combined diff
Diffstat (limited to 't')
-rwxr-xr-xt/t4038-diff-combined.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t4038-diff-combined.sh b/t/t4038-diff-combined.sh
index 40277c77a..614425ada 100755
--- a/t/t4038-diff-combined.sh
+++ b/t/t4038-diff-combined.sh
@@ -89,4 +89,28 @@ test_expect_success 'diagnose truncated file' '
grep "diff --cc file" out
'
+test_expect_success 'setup for --cc --raw' '
+ blob=$(echo file | git hash-object --stdin -w) &&
+ base_tree=$(echo "100644 blob $blob file" | git mktree) &&
+ trees= &&
+ for i in `test_seq 1 40`
+ do
+ blob=$(echo file$i | git hash-object --stdin -w) &&
+ trees="$trees$(echo "100644 blob $blob file" | git mktree)$LF"
+ done
+'
+
+test_expect_success 'check --cc --raw with four trees' '
+ four_trees=$(echo "$trees" | sed -e 4q) &&
+ git diff --cc --raw $four_trees $base_tree >out &&
+ # Check for four leading colons in the output:
+ grep "^::::[^:]" out
+'
+
+test_expect_success 'check --cc --raw with forty trees' '
+ git diff --cc --raw $trees $base_tree >out &&
+ # Check for forty leading colons in the output:
+ grep "^::::::::::::::::::::::::::::::::::::::::[^:]" out
+'
+
test_done