about summary refs log tree commit diff
path: root/third_party/git/t/t4042-diff-textconv-caching.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/t4042-diff-textconv-caching.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/t4042-diff-textconv-caching.sh')
-rwxr-xr-xthird_party/git/t/t4042-diff-textconv-caching.sh121
1 files changed, 0 insertions, 121 deletions
diff --git a/third_party/git/t/t4042-diff-textconv-caching.sh b/third_party/git/t/t4042-diff-textconv-caching.sh
deleted file mode 100755
index bf33aedf4b..0000000000
--- a/third_party/git/t/t4042-diff-textconv-caching.sh
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/bin/sh
-
-test_description='test textconv caching'
-. ./test-lib.sh
-
-cat >helper <<'EOF'
-#!/bin/sh
-sed 's/^/converted: /' "$@" >helper.out
-cat helper.out
-EOF
-chmod +x helper
-
-test_expect_success 'setup' '
-	echo foo content 1 >foo.bin &&
-	echo bar content 1 >bar.bin &&
-	git add . &&
-	git commit -m one &&
-	foo1=$(git rev-parse --short HEAD:foo.bin) &&
-	bar1=$(git rev-parse --short HEAD:bar.bin) &&
-	echo foo content 2 >foo.bin &&
-	echo bar content 2 >bar.bin &&
-	git commit -a -m two &&
-	foo2=$(git rev-parse --short HEAD:foo.bin) &&
-	bar2=$(git rev-parse --short HEAD:bar.bin) &&
-	echo "*.bin diff=magic" >.gitattributes &&
-	git config diff.magic.textconv ./helper &&
-	git config diff.magic.cachetextconv true
-'
-
-cat >expect <<EOF
-diff --git a/bar.bin b/bar.bin
-index $bar1..$bar2 100644
---- a/bar.bin
-+++ b/bar.bin
-@@ -1 +1 @@
--converted: bar content 1
-+converted: bar content 2
-diff --git a/foo.bin b/foo.bin
-index $foo1..$foo2 100644
---- a/foo.bin
-+++ b/foo.bin
-@@ -1 +1 @@
--converted: foo content 1
-+converted: foo content 2
-EOF
-
-test_expect_success 'first textconv works' '
-	git diff HEAD^ HEAD >actual &&
-	test_cmp expect actual
-'
-
-test_expect_success 'cached textconv produces same output' '
-	git diff HEAD^ HEAD >actual &&
-	test_cmp expect actual
-'
-
-test_expect_success 'cached textconv does not run helper' '
-	rm -f helper.out &&
-	git diff HEAD^ HEAD >actual &&
-	test_cmp expect actual &&
-	! test -r helper.out
-'
-
-cat >expect <<EOF
-diff --git a/bar.bin b/bar.bin
-index $bar1..$bar2 100644
---- a/bar.bin
-+++ b/bar.bin
-@@ -1,2 +1,2 @@
- converted: other
--converted: bar content 1
-+converted: bar content 2
-diff --git a/foo.bin b/foo.bin
-index $foo1..$foo2 100644
---- a/foo.bin
-+++ b/foo.bin
-@@ -1,2 +1,2 @@
- converted: other
--converted: foo content 1
-+converted: foo content 2
-EOF
-test_expect_success 'changing textconv invalidates cache' '
-	echo other >other &&
-	git config diff.magic.textconv "./helper other" &&
-	git diff HEAD^ HEAD >actual &&
-	test_cmp expect actual
-'
-
-cat >expect <<EOF
-diff --git a/bar.bin b/bar.bin
-index $bar1..$bar2 100644
---- a/bar.bin
-+++ b/bar.bin
-@@ -1,2 +1,2 @@
- converted: other
--converted: bar content 1
-+converted: bar content 2
-diff --git a/foo.bin b/foo.bin
-index $foo1..$foo2 100644
---- a/foo.bin
-+++ b/foo.bin
-@@ -1 +1 @@
--converted: foo content 1
-+converted: foo content 2
-EOF
-test_expect_success 'switching diff driver produces correct results' '
-	git config diff.moremagic.textconv ./helper &&
-	echo foo.bin diff=moremagic >>.gitattributes &&
-	git diff HEAD^ HEAD >actual &&
-	test_cmp expect actual
-'
-
-# The point here is to test that we can log the notes cache and still use it to
-# produce a diff later (older versions of git would segfault on this). It's
-# much more likely to come up in the real world with "log --all -p", but using
-# --no-walk lets us reliably reproduce the order of traversal.
-test_expect_success 'log notes cache and still use cache for -p' '
-	git log --no-walk -p refs/notes/textconv/magic HEAD
-'
-
-test_done