about summary refs log tree commit diff
path: root/third_party/git/t/t4022-diff-rewrite.sh
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-09-21T10·03+0300
committerVincent Ambo <mail@tazj.in>2021-09-21T11·29+0300
commit43b1791ec601732ac31195df96781a848360a9ac (patch)
treedaae8d638343295d2f1f7da955e556ef4c958864 /third_party/git/t/t4022-diff-rewrite.sh
parent2d8e7dc9d9c38127ec4ebd13aee8e8f586a43318 (diff)
chore(3p/git): Unvendor git and track patches instead r/2903
This was vendored a long time ago under the expectation that keeping
it in sync with cgit would be easier this way, but it has proven not
to be a big issue.

On the other hand, a vendored copy of git is an annoying maintenance
burden. It is much easier to rebase the single (dottime) patch that we
have.

This removes the vendored copy of git and instead passes the git
source code to cgit via `pkgs.srcOnly`, which includes the applied
patch so that cgit can continue rendering dottime.

Change-Id: If31f62dea7ce688fd1b9050204e9378019775f2b
Diffstat (limited to 'third_party/git/t/t4022-diff-rewrite.sh')
-rwxr-xr-xthird_party/git/t/t4022-diff-rewrite.sh99
1 files changed, 0 insertions, 99 deletions
diff --git a/third_party/git/t/t4022-diff-rewrite.sh b/third_party/git/t/t4022-diff-rewrite.sh
deleted file mode 100755
index 6d1c3d949c78..000000000000
--- a/third_party/git/t/t4022-diff-rewrite.sh
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/bin/sh
-
-test_description='rewrite diff'
-
-. ./test-lib.sh
-
-test_expect_success setup '
-
-	cat "$TEST_DIRECTORY"/../COPYING >test &&
-	git add test &&
-	tr \
-	  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" \
-	  "nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM" \
-	  <"$TEST_DIRECTORY"/../COPYING >test &&
-	echo "to be deleted" >test2 &&
-	blob=$(git hash-object test2) &&
-	blob=$(git rev-parse --short $blob) &&
-	git add test2
-
-'
-
-test_expect_success 'detect rewrite' '
-
-	actual=$(git diff-files -B --summary test) &&
-	verbose expr "$actual" : " rewrite test ([0-9]*%)$"
-
-'
-
-cat >expect <<EOF
-diff --git a/test2 b/test2
-deleted file mode 100644
-index $blob..0000000
---- a/test2
-+++ /dev/null
-@@ -1 +0,0 @@
--to be deleted
-EOF
-test_expect_success 'show deletion diff without -D' '
-
-	rm test2 &&
-	git diff -- test2 >actual &&
-	test_cmp expect actual
-'
-
-cat >expect <<EOF
-diff --git a/test2 b/test2
-deleted file mode 100644
-index $blob..0000000
-EOF
-test_expect_success 'suppress deletion diff with -D' '
-
-	git diff -D -- test2 >actual &&
-	test_cmp expect actual
-'
-
-test_expect_success 'show deletion diff with -B' '
-
-	git diff -B -- test >actual &&
-	grep "Linus Torvalds" actual
-'
-
-test_expect_success 'suppress deletion diff with -B -D' '
-
-	git diff -B -D -- test >actual &&
-	grep -v "Linus Torvalds" actual
-'
-
-test_expect_success 'prepare a file that ends with an incomplete line' '
-	test_seq 1 99 >seq &&
-	printf 100 >>seq &&
-	git add seq &&
-	git commit seq -m seq
-'
-
-test_expect_success 'rewrite the middle 90% of sequence file and terminate with newline' '
-	test_seq 1 5 >seq &&
-	test_seq 9331 9420 >>seq &&
-	test_seq 96 100 >>seq
-'
-
-test_expect_success 'confirm that sequence file is considered a rewrite' '
-	git diff -B seq >res &&
-	grep "dissimilarity index" res
-'
-
-test_expect_success 'no newline at eof is on its own line without -B' '
-	git diff seq >res &&
-	grep "^\\\\ " res &&
-	! grep "^..*\\\\ " res
-'
-
-test_expect_success 'no newline at eof is on its own line with -B' '
-	git diff -B seq >res &&
-	grep "^\\\\ " res &&
-	! grep "^..*\\\\ " res
-'
-
-test_done
-