about summary refs log tree commit diff
path: root/third_party/git/t/t0002-gitfile.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/t0002-gitfile.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/t0002-gitfile.sh')
-rwxr-xr-xthird_party/git/t/t0002-gitfile.sh131
1 files changed, 0 insertions, 131 deletions
diff --git a/third_party/git/t/t0002-gitfile.sh b/third_party/git/t/t0002-gitfile.sh
deleted file mode 100755
index 960ed150cb..0000000000
--- a/third_party/git/t/t0002-gitfile.sh
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/bin/sh
-
-test_description='.git file
-
-Verify that plumbing commands work when .git is a file
-'
-. ./test-lib.sh
-
-objpath() {
-	echo "$1" | sed -e 's|\(..\)|\1/|'
-}
-
-test_expect_success 'initial setup' '
-	REAL="$(pwd)/.real" &&
-	mv .git "$REAL"
-'
-
-test_expect_success 'bad setup: invalid .git file format' '
-	echo "gitdir $REAL" >.git &&
-	test_must_fail git rev-parse 2>.err &&
-	test_i18ngrep "invalid gitfile format" .err
-'
-
-test_expect_success 'bad setup: invalid .git file path' '
-	echo "gitdir: $REAL.not" >.git &&
-	test_must_fail git rev-parse 2>.err &&
-	test_i18ngrep "not a git repository" .err
-'
-
-test_expect_success 'final setup + check rev-parse --git-dir' '
-	echo "gitdir: $REAL" >.git &&
-	test "$REAL" = "$(git rev-parse --git-dir)"
-'
-
-test_expect_success 'check hash-object' '
-	echo "foo" >bar &&
-	SHA=$(cat bar | git hash-object -w --stdin) &&
-	test_path_is_file "$REAL/objects/$(objpath $SHA)"
-'
-
-test_expect_success 'check cat-file' '
-	git cat-file blob $SHA >actual &&
-	test_cmp bar actual
-'
-
-test_expect_success 'check update-index' '
-	test_path_is_missing "$REAL/index" &&
-	rm -f "$REAL/objects/$(objpath $SHA)" &&
-	git update-index --add bar &&
-	test_path_is_file "$REAL/index" &&
-	test_path_is_file "$REAL/objects/$(objpath $SHA)"
-'
-
-test_expect_success 'check write-tree' '
-	SHA=$(git write-tree) &&
-	test_path_is_file "$REAL/objects/$(objpath $SHA)"
-'
-
-test_expect_success 'check commit-tree' '
-	SHA=$(echo "commit bar" | git commit-tree $SHA) &&
-	test_path_is_file "$REAL/objects/$(objpath $SHA)"
-'
-
-test_expect_success 'check rev-list' '
-	git update-ref "HEAD" "$SHA" &&
-	test "$SHA" = "$(git rev-list HEAD)"
-'
-
-test_expect_success 'setup_git_dir twice in subdir' '
-	git init sgd &&
-	(
-		cd sgd &&
-		git config alias.lsfi ls-files &&
-		mv .git .realgit &&
-		echo "gitdir: .realgit" >.git &&
-		mkdir subdir &&
-		cd subdir &&
-		>foo &&
-		git add foo &&
-		git lsfi >actual &&
-		echo foo >expected &&
-		test_cmp expected actual
-	)
-'
-
-test_expect_success 'enter_repo non-strict mode' '
-	test_create_repo enter_repo &&
-	(
-		cd enter_repo &&
-		test_tick &&
-		test_commit foo &&
-		mv .git .realgit &&
-		echo "gitdir: .realgit" >.git
-	) &&
-	head=$(git -C enter_repo rev-parse HEAD) &&
-	git ls-remote enter_repo >actual &&
-	cat >expected <<-EOF &&
-	$head	HEAD
-	$head	refs/heads/master
-	$head	refs/tags/foo
-	EOF
-	test_cmp expected actual
-'
-
-test_expect_success 'enter_repo linked checkout' '
-	(
-		cd enter_repo &&
-		git worktree add  ../foo refs/tags/foo
-	) &&
-	head=$(git -C enter_repo rev-parse HEAD) &&
-	git ls-remote foo >actual &&
-	cat >expected <<-EOF &&
-	$head	HEAD
-	$head	refs/heads/master
-	$head	refs/tags/foo
-	EOF
-	test_cmp expected actual
-'
-
-test_expect_success 'enter_repo strict mode' '
-	head=$(git -C enter_repo rev-parse HEAD) &&
-	git ls-remote --upload-pack="git upload-pack --strict" foo/.git >actual &&
-	cat >expected <<-EOF &&
-	$head	HEAD
-	$head	refs/heads/master
-	$head	refs/tags/foo
-	EOF
-	test_cmp expected actual
-'
-
-test_done