diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-25T23·06+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-25T23·06+0100 |
commit | 93ba78d6f4632ef1c5228965e3edc8c0faf88c1e (patch) | |
tree | 85730c182a9f5f492ade8e8ccdb1c2356f9900bd /third_party/git/t/t4013-diff-various.sh | |
parent | 6f8fbf4aa4b1654ab27d4829e114538761817de0 (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/t4013-diff-various.sh')
-rwxr-xr-x | third_party/git/t/t4013-diff-various.sh | 47 |
1 files changed, 9 insertions, 38 deletions
diff --git a/third_party/git/t/t4013-diff-various.sh b/third_party/git/t/t4013-diff-various.sh index dde3f11fec36..a9054d2db116 100755 --- a/third_party/git/t/t4013-diff-various.sh +++ b/third_party/git/t/t4013-diff-various.sh @@ -7,6 +7,9 @@ test_description='Various diff formatting options' . ./test-lib.sh +LF=' +' + test_expect_success setup ' GIT_AUTHOR_DATE="2006-06-26 00:00:00 +0000" && @@ -120,30 +123,6 @@ test_expect_success setup ' +*++ [initial] Initial EOF -process_diffs () { - _x04="[0-9a-f][0-9a-f][0-9a-f][0-9a-f]" && - _x07="$_x05[0-9a-f][0-9a-f]" && - sed -e "s/$OID_REGEX/$ZERO_OID/g" \ - -e "s/From $_x40 /From $ZERO_OID /" \ - -e "s/from $_x40)/from $ZERO_OID)/" \ - -e "s/commit $_x40\$/commit $ZERO_OID/" \ - -e "s/commit $_x40 (/commit $ZERO_OID (/" \ - -e "s/$_x40 $_x40 $_x40/$ZERO_OID $ZERO_OID $ZERO_OID/" \ - -e "s/$_x40 $_x40 /$ZERO_OID $ZERO_OID /" \ - -e "s/^$_x40 $_x40$/$ZERO_OID $ZERO_OID/" \ - -e "s/^$_x40 /$ZERO_OID /" \ - -e "s/^$_x40$/$ZERO_OID/" \ - -e "s/$_x07\.\.$_x07/fffffff..fffffff/g" \ - -e "s/$_x07,$_x07\.\.$_x07/fffffff,fffffff..fffffff/g" \ - -e "s/$_x07 $_x07 $_x07/fffffff fffffff fffffff/g" \ - -e "s/$_x07 $_x07 /fffffff fffffff /g" \ - -e "s/Merge: $_x07 $_x07/Merge: fffffff fffffff/g" \ - -e "s/$_x07\.\.\./fffffff.../g" \ - -e "s/ $_x04\.\.\./ ffff.../g" \ - -e "s/ $_x04/ ffff/g" \ - "$1" -} - V=$(git version | sed -e 's/^git version //' -e 's/\./\\./g') while read magic cmd do @@ -182,15 +161,13 @@ do } >"$actual" && if test -f "$expect" then - process_diffs "$actual" >actual && - process_diffs "$expect" >expect && case $cmd in *format-patch* | *-stat*) - test_i18ncmp expect actual;; + test_i18ncmp "$expect" "$actual";; *) - test_cmp expect actual;; + test_cmp "$expect" "$actual";; esac && - rm -f "$actual" actual expect + rm -f "$actual" else # this is to help developing new tests. cp "$actual" "$expect" @@ -409,22 +386,16 @@ test_expect_success 'log -S requires an argument' ' test_expect_success 'diff --cached on unborn branch' ' echo ref: refs/heads/unborn >.git/HEAD && git diff --cached >result && - process_diffs result >actual && - process_diffs "$TEST_DIRECTORY/t4013/diff.diff_--cached" >expected && - test_cmp expected actual + test_cmp "$TEST_DIRECTORY/t4013/diff.diff_--cached" result ' test_expect_success 'diff --cached -- file on unborn branch' ' git diff --cached -- file0 >result && - process_diffs result >actual && - process_diffs "$TEST_DIRECTORY/t4013/diff.diff_--cached_--_file0" >expected && - test_cmp expected actual + test_cmp "$TEST_DIRECTORY/t4013/diff.diff_--cached_--_file0" result ' test_expect_success 'diff --line-prefix with spaces' ' git diff --line-prefix="| | | " --cached -- file0 >result && - process_diffs result >actual && - process_diffs "$TEST_DIRECTORY/t4013/diff.diff_--line-prefix_--cached_--_file0" >expected && - test_cmp expected actual + test_cmp "$TEST_DIRECTORY/t4013/diff.diff_--line-prefix_--cached_--_file0" result ' test_expect_success 'diff-tree --stdin with log formatting' ' |