about summary refs log tree commit diff
path: root/third_party/git/t/t4065-diff-anchored.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/t4065-diff-anchored.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/t4065-diff-anchored.sh')
-rwxr-xr-xthird_party/git/t/t4065-diff-anchored.sh94
1 files changed, 0 insertions, 94 deletions
diff --git a/third_party/git/t/t4065-diff-anchored.sh b/third_party/git/t/t4065-diff-anchored.sh
deleted file mode 100755
index b3f510f040ec..000000000000
--- a/third_party/git/t/t4065-diff-anchored.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/sh
-
-test_description='anchored diff algorithm'
-
-. ./test-lib.sh
-
-test_expect_success '--anchored' '
-	printf "a\nb\nc\n" >pre &&
-	printf "c\na\nb\n" >post &&
-
-	# normally, c is moved to produce the smallest diff
-	test_expect_code 1 git diff --no-index pre post >diff &&
-	grep "^+c" diff &&
-
-	# with anchor, a is moved
-	test_expect_code 1 git diff --no-index --anchored=c pre post >diff &&
-	grep "^+a" diff
-'
-
-test_expect_success '--anchored multiple' '
-	printf "a\nb\nc\nd\ne\nf\n" >pre &&
-	printf "c\na\nb\nf\nd\ne\n" >post &&
-
-	# with 1 anchor, c is not moved, but f is moved
-	test_expect_code 1 git diff --no-index --anchored=c pre post >diff &&
-	grep "^+a" diff && # a is moved instead of c
-	grep "^+f" diff &&
-
-	# with 2 anchors, c and f are not moved
-	test_expect_code 1 git diff --no-index --anchored=c --anchored=f pre post >diff &&
-	grep "^+a" diff &&
-	grep "^+d" diff # d is moved instead of f
-'
-
-test_expect_success '--anchored with nonexistent line has no effect' '
-	printf "a\nb\nc\n" >pre &&
-	printf "c\na\nb\n" >post &&
-
-	test_expect_code 1 git diff --no-index --anchored=x pre post >diff &&
-	grep "^+c" diff
-'
-
-test_expect_success '--anchored with non-unique line has no effect' '
-	printf "a\nb\nc\nd\ne\nc\n" >pre &&
-	printf "c\na\nb\nc\nd\ne\n" >post &&
-
-	test_expect_code 1 git diff --no-index --anchored=c pre post >diff &&
-	grep "^+c" diff
-'
-
-test_expect_success 'diff still produced with impossible multiple --anchored' '
-	printf "a\nb\nc\n" >pre &&
-	printf "c\na\nb\n" >post &&
-
-	test_expect_code 1 git diff --no-index --anchored=a --anchored=c pre post >diff &&
-	mv post expected_post &&
-
-	# Ensure that the diff is correct by applying it and then
-	# comparing the result with the original
-	git apply diff &&
-	diff expected_post post
-'
-
-test_expect_success 'later algorithm arguments override earlier ones' '
-	printf "a\nb\nc\n" >pre &&
-	printf "c\na\nb\n" >post &&
-
-	test_expect_code 1 git diff --no-index --patience --anchored=c pre post >diff &&
-	grep "^+a" diff &&
-
-	test_expect_code 1 git diff --no-index --anchored=c --patience pre post >diff &&
-	grep "^+c" diff &&
-
-	test_expect_code 1 git diff --no-index --histogram --anchored=c pre post >diff &&
-	grep "^+a" diff &&
-
-	test_expect_code 1 git diff --no-index --anchored=c --histogram pre post >diff &&
-	grep "^+c" diff
-'
-
-test_expect_success '--anchored works with other commands like "git show"' '
-	printf "a\nb\nc\n" >file &&
-	git add file &&
-	git commit -m foo &&
-	printf "c\na\nb\n" >file &&
-	git add file &&
-	git commit -m foo &&
-
-	# with anchor, a is moved
-	git show --patience --anchored=c >diff &&
-	grep "^+a" diff
-'
-
-test_done