File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -89,4 +89,28 @@ test_expect_success 'diagnose truncated file' '
89
89
grep "diff --cc file" out
90
90
'
91
91
92
+ test_expect_success ' setup for --cc --raw' '
93
+ blob=$(echo file | git hash-object --stdin -w) &&
94
+ base_tree=$(echo "100644 blob $blob file" | git mktree) &&
95
+ trees= &&
96
+ for i in `test_seq 1 40`
97
+ do
98
+ blob=$(echo file$i | git hash-object --stdin -w) &&
99
+ trees="$trees$(echo "100644 blob $blob file" | git mktree)$LF"
100
+ done
101
+ '
102
+
103
+ test_expect_success ' check --cc --raw with four trees' '
104
+ four_trees=$(echo "$trees" | sed -e 4q) &&
105
+ git diff --cc --raw $four_trees $base_tree >out &&
106
+ # Check for four leading colons in the output:
107
+ grep "^::::[^:]" out
108
+ '
109
+
110
+ test_expect_success ' check --cc --raw with forty trees' '
111
+ git diff --cc --raw $trees $base_tree >out &&
112
+ # Check for forty leading colons in the output:
113
+ grep "^::::::::::::::::::::::::::::::::::::::::[^:]" out
114
+ '
115
+
92
116
test_done
You can’t perform that action at this time.
0 commit comments