about summary refs log tree commit diff
path: root/third_party/git/t/t8011-blame-split-file.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/t8011-blame-split-file.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/t8011-blame-split-file.sh')
-rwxr-xr-xthird_party/git/t/t8011-blame-split-file.sh117
1 files changed, 0 insertions, 117 deletions
diff --git a/third_party/git/t/t8011-blame-split-file.sh b/third_party/git/t/t8011-blame-split-file.sh
deleted file mode 100755
index bdda0c03fe..0000000000
--- a/third_party/git/t/t8011-blame-split-file.sh
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/bin/sh
-
-test_description='
-The general idea is that we have a single file whose lines come from
-multiple other files, and those individual files were modified in the same
-commits. That means that we will see the same commit in multiple contexts,
-and each one should be attributed to the correct file.
-
-Note that we need to use "blame -C" to find the commit for all lines. We will
-not bother testing that the non-C case fails to find it. That is how blame
-behaves now, but it is not a property we want to make sure is retained.
-'
-. ./test-lib.sh
-
-# help avoid typing and reading long strings of similar lines
-# in the tests below
-generate_expect () {
-	while read nr data
-	do
-		i=0
-		while test $i -lt $nr
-		do
-			echo $data
-			i=$((i + 1))
-		done
-	done
-}
-
-test_expect_success 'setup split file case' '
-	# use lines long enough to trigger content detection
-	test_seq 1000 1010 >one &&
-	test_seq 2000 2010 >two &&
-	git add one two &&
-	test_commit base &&
-
-	sed "6s/^/modified /" <one >one.tmp &&
-	mv one.tmp one &&
-	sed "6s/^/modified /" <two >two.tmp &&
-	mv two.tmp two &&
-	git add -u &&
-	test_commit modified &&
-
-	cat one two >combined &&
-	git add combined &&
-	git rm one two &&
-	test_commit combined
-'
-
-test_expect_success 'setup simulated porcelain' '
-	# This just reads porcelain-ish output and tries
-	# to output the value of a given field for each line (either by
-	# reading the field that accompanies this line, or referencing
-	# the information found last time the commit was mentioned).
-	cat >read-porcelain.pl <<-\EOF
-	my $field = shift;
-	while (<>) {
-		if (/^[0-9a-f]{40,} /) {
-			flush();
-			$hash = $&;
-		} elsif (/^$field (.*)/) {
-			$cache{$hash} = $1;
-		}
-	}
-	flush();
-
-	sub flush {
-		return unless defined $hash;
-		if (defined $cache{$hash}) {
-			print "$cache{$hash}\n";
-		} else {
-			print "NONE\n";
-		}
-	}
-	EOF
-'
-
-for output in porcelain line-porcelain
-do
-	test_expect_success "generate --$output output" '
-		git blame --root -C --$output combined >output
-	'
-
-	test_expect_success "$output output finds correct commits" '
-		generate_expect >expect <<-\EOF &&
-		5 base
-		1 modified
-		10 base
-		1 modified
-		5 base
-		EOF
-		perl read-porcelain.pl summary <output >actual &&
-		test_cmp expect actual
-	'
-
-	test_expect_success "$output output shows correct filenames" '
-		generate_expect >expect <<-\EOF &&
-		11 one
-		11 two
-		EOF
-		perl read-porcelain.pl filename <output >actual &&
-		test_cmp expect actual
-	'
-
-	test_expect_success "$output output shows correct previous pointer" '
-		generate_expect >expect <<-EOF &&
-		5 NONE
-		1 $(git rev-parse modified^) one
-		10 NONE
-		1 $(git rev-parse modified^) two
-		5 NONE
-		EOF
-		perl read-porcelain.pl previous <output >actual &&
-		test_cmp expect actual
-	'
-done
-
-test_done