about summary refs log tree commit diff
path: root/third_party/git/t/t4048-diff-combined-binary.sh
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
committerVincent Ambo <tazjin@google.com>2020-05-25T23·06+0100
commit93ba78d6f4632ef1c5228965e3edc8c0faf88c1e (patch)
tree85730c182a9f5f492ade8e8ccdb1c2356f9900bd /third_party/git/t/t4048-diff-combined-binary.sh
parent6f8fbf4aa4b1654ab27d4829e114538761817de0 (diff)
revert(3p/git): Revert merge of git upstream at v2.26.2 r/852
This causes cgit to serve error pages, which is undesirable.

This reverts commit 5229c9b232de5bfa959ad6ebbb4c8192ac513352, reversing
changes made to f2b211131f2347342dde63975b09cf603149f1a3.
Diffstat (limited to 'third_party/git/t/t4048-diff-combined-binary.sh')
-rwxr-xr-xthird_party/git/t/t4048-diff-combined-binary.sh58
1 files changed, 26 insertions, 32 deletions
diff --git a/third_party/git/t/t4048-diff-combined-binary.sh b/third_party/git/t/t4048-diff-combined-binary.sh
index 7f9ad9fa3d..87a8949500 100755
--- a/third_party/git/t/t4048-diff-combined-binary.sh
+++ b/third_party/git/t/t4048-diff-combined-binary.sh
@@ -9,27 +9,24 @@ test_expect_success 'setup binary merge conflict' '
 	git commit -m one &&
 	echo twoQ2 | q_to_nul >binary &&
 	git commit -a -m two &&
-	two=$(git rev-parse --short HEAD:binary) &&
 	git checkout -b branch-binary HEAD^ &&
 	echo threeQ3 | q_to_nul >binary &&
 	git commit -a -m three &&
-	three=$(git rev-parse --short HEAD:binary) &&
 	test_must_fail git merge master &&
 	echo resolvedQhooray | q_to_nul >binary &&
-	git commit -a -m resolved &&
-	res=$(git rev-parse --short HEAD:binary)
+	git commit -a -m resolved
 '
 
-cat >expect <<EOF
+cat >expect <<'EOF'
 resolved
 
 diff --git a/binary b/binary
-index $three..$res 100644
+index 7ea6ded..9563691 100644
 Binary files a/binary and b/binary differ
 resolved
 
 diff --git a/binary b/binary
-index $two..$res 100644
+index 6197570..9563691 100644
 Binary files a/binary and b/binary differ
 EOF
 test_expect_success 'diff -m indicates binary-ness' '
@@ -37,11 +34,11 @@ test_expect_success 'diff -m indicates binary-ness' '
 	test_cmp expect actual
 '
 
-cat >expect <<EOF
+cat >expect <<'EOF'
 resolved
 
 diff --combined binary
-index $three,$two..$res
+index 7ea6ded,6197570..9563691
 Binary files differ
 EOF
 test_expect_success 'diff -c indicates binary-ness' '
@@ -49,11 +46,11 @@ test_expect_success 'diff -c indicates binary-ness' '
 	test_cmp expect actual
 '
 
-cat >expect <<EOF
+cat >expect <<'EOF'
 resolved
 
 diff --cc binary
-index $three,$two..$res
+index 7ea6ded,6197570..9563691
 Binary files differ
 EOF
 test_expect_success 'diff --cc indicates binary-ness' '
@@ -65,26 +62,23 @@ test_expect_success 'setup non-binary with binary attribute' '
 	git checkout master &&
 	test_commit one text &&
 	test_commit two text &&
-	two=$(git rev-parse --short HEAD:text) &&
 	git checkout -b branch-text HEAD^ &&
 	test_commit three text &&
-	three=$(git rev-parse --short HEAD:text) &&
 	test_must_fail git merge master &&
 	test_commit resolved text &&
-	res=$(git rev-parse --short HEAD:text) &&
 	echo text -diff >.gitattributes
 '
 
-cat >expect <<EOF
+cat >expect <<'EOF'
 resolved
 
 diff --git a/text b/text
-index $three..$res 100644
+index 2bdf67a..2ab19ae 100644
 Binary files a/text and b/text differ
 resolved
 
 diff --git a/text b/text
-index $two..$res 100644
+index f719efd..2ab19ae 100644
 Binary files a/text and b/text differ
 EOF
 test_expect_success 'diff -m respects binary attribute' '
@@ -92,11 +86,11 @@ test_expect_success 'diff -m respects binary attribute' '
 	test_cmp expect actual
 '
 
-cat >expect <<EOF
+cat >expect <<'EOF'
 resolved
 
 diff --combined text
-index $three,$two..$res
+index 2bdf67a,f719efd..2ab19ae
 Binary files differ
 EOF
 test_expect_success 'diff -c respects binary attribute' '
@@ -104,11 +98,11 @@ test_expect_success 'diff -c respects binary attribute' '
 	test_cmp expect actual
 '
 
-cat >expect <<EOF
+cat >expect <<'EOF'
 resolved
 
 diff --cc text
-index $three,$two..$res
+index 2bdf67a,f719efd..2ab19ae
 Binary files differ
 EOF
 test_expect_success 'diff --cc respects binary attribute' '
@@ -121,11 +115,11 @@ test_expect_success 'setup textconv attribute' '
 	git config diff.upcase.textconv "tr a-z A-Z <"
 '
 
-cat >expect <<EOF
+cat >expect <<'EOF'
 resolved
 
 diff --git a/text b/text
-index $three..$res 100644
+index 2bdf67a..2ab19ae 100644
 --- a/text
 +++ b/text
 @@ -1 +1 @@
@@ -134,7 +128,7 @@ index $three..$res 100644
 resolved
 
 diff --git a/text b/text
-index $two..$res 100644
+index f719efd..2ab19ae 100644
 --- a/text
 +++ b/text
 @@ -1 +1 @@
@@ -146,11 +140,11 @@ test_expect_success 'diff -m respects textconv attribute' '
 	test_cmp expect actual
 '
 
-cat >expect <<EOF
+cat >expect <<'EOF'
 resolved
 
 diff --combined text
-index $three,$two..$res
+index 2bdf67a,f719efd..2ab19ae
 --- a/text
 +++ b/text
 @@@ -1,1 -1,1 +1,1 @@@
@@ -163,11 +157,11 @@ test_expect_success 'diff -c respects textconv attribute' '
 	test_cmp expect actual
 '
 
-cat >expect <<EOF
+cat >expect <<'EOF'
 resolved
 
 diff --cc text
-index $three,$two..$res
+index 2bdf67a,f719efd..2ab19ae
 --- a/text
 +++ b/text
 @@@ -1,1 -1,1 +1,1 @@@
@@ -180,9 +174,9 @@ test_expect_success 'diff --cc respects textconv attribute' '
 	test_cmp expect actual
 '
 
-cat >expect <<EOF
+cat >expect <<'EOF'
 diff --combined text
-index $three,$two..$res
+index 2bdf67a,f719efd..2ab19ae
 --- a/text
 +++ b/text
 @@@ -1,1 -1,1 +1,1 @@@
@@ -196,9 +190,9 @@ test_expect_success 'diff-tree plumbing does not respect textconv' '
 	test_cmp expect actual
 '
 
-cat >expect <<EOF
+cat >expect <<'EOF'
 diff --cc text
-index $three,$two..0000000
+index 2bdf67a,f719efd..0000000
 --- a/text
 +++ b/text
 @@@ -1,1 -1,1 +1,5 @@@