about summary refs log tree commit diff
path: root/third_party/git/t/t3306-notes-prune.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/t3306-notes-prune.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/t3306-notes-prune.sh')
-rwxr-xr-xthird_party/git/t/t3306-notes-prune.sh138
1 files changed, 0 insertions, 138 deletions
diff --git a/third_party/git/t/t3306-notes-prune.sh b/third_party/git/t/t3306-notes-prune.sh
deleted file mode 100755
index 8f4102ff9e44..000000000000
--- a/third_party/git/t/t3306-notes-prune.sh
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/bin/sh
-
-test_description='Test git notes prune'
-
-. ./test-lib.sh
-
-test_expect_success 'setup: create a few commits with notes' '
-
-	: > file1 &&
-	git add file1 &&
-	test_tick &&
-	git commit -m 1st &&
-	git notes add -m "Note #1" &&
-	first=$(git rev-parse HEAD) &&
-	: > file2 &&
-	git add file2 &&
-	test_tick &&
-	git commit -m 2nd &&
-	git notes add -m "Note #2" &&
-	second=$(git rev-parse HEAD) &&
-	: > file3 &&
-	git add file3 &&
-	test_tick &&
-	git commit -m 3rd &&
-	third=$(git rev-parse HEAD) &&
-	COMMIT_FILE=$(echo $third | sed "s!^..!.git/objects/&/!") &&
-	test -f $COMMIT_FILE &&
-	test-tool chmtime =+0 $COMMIT_FILE &&
-	git notes add -m "Note #3"
-'
-
-cat > expect <<END_OF_LOG
-commit $third
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:15:13 2005 -0700
-
-    3rd
-
-Notes:
-    Note #3
-
-commit $second
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:14:13 2005 -0700
-
-    2nd
-
-Notes:
-    Note #2
-
-commit $first
-Author: A U Thor <author@example.com>
-Date:   Thu Apr 7 15:13:13 2005 -0700
-
-    1st
-
-Notes:
-    Note #1
-END_OF_LOG
-
-test_expect_success 'verify commits and notes' '
-
-	git log > actual &&
-	test_cmp expect actual
-'
-
-test_expect_success 'remove some commits' '
-
-	git reset --hard HEAD~1 &&
-	git reflog expire --expire=now HEAD &&
-	git gc --prune=now
-'
-
-test_expect_success 'verify that commits are gone' '
-
-	test_must_fail git cat-file -p $third &&
-	git cat-file -p $second &&
-	git cat-file -p $first
-'
-
-test_expect_success 'verify that notes are still present' '
-
-	git notes show $third &&
-	git notes show $second &&
-	git notes show $first
-'
-
-test_expect_success 'prune -n does not remove notes' '
-
-	git notes list > expect &&
-	git notes prune -n &&
-	git notes list > actual &&
-	test_cmp expect actual
-'
-
-
-test_expect_success 'prune -n lists prunable notes' '
-
-	echo $third >expect &&
-	git notes prune -n > actual &&
-	test_cmp expect actual
-'
-
-
-test_expect_success 'prune notes' '
-
-	git notes prune
-'
-
-test_expect_success 'verify that notes are gone' '
-
-	test_must_fail git notes show $third &&
-	git notes show $second &&
-	git notes show $first
-'
-
-test_expect_success 'remove some commits' '
-
-	git reset --hard HEAD~1 &&
-	git reflog expire --expire=now HEAD &&
-	git gc --prune=now
-'
-
-test_expect_success 'prune -v notes' '
-
-	echo $second >expect &&
-	git notes prune -v > actual &&
-	test_cmp expect actual
-'
-
-test_expect_success 'verify that notes are gone' '
-
-	test_must_fail git notes show $third &&
-	test_must_fail git notes show $second &&
-	git notes show $first
-'
-
-test_done