about summary refs log tree commit diff
path: root/third_party/git/t/t7011-skip-worktree-reading.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/t7011-skip-worktree-reading.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/t7011-skip-worktree-reading.sh')
-rwxr-xr-xthird_party/git/t/t7011-skip-worktree-reading.sh161
1 files changed, 0 insertions, 161 deletions
diff --git a/third_party/git/t/t7011-skip-worktree-reading.sh b/third_party/git/t/t7011-skip-worktree-reading.sh
deleted file mode 100755
index 37525cae3af3..000000000000
--- a/third_party/git/t/t7011-skip-worktree-reading.sh
+++ /dev/null
@@ -1,161 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2008 Nguyễn Thái Ngọc Duy
-#
-
-test_description='skip-worktree bit test'
-
-. ./test-lib.sh
-
-cat >expect.full <<EOF
-H 1
-H 2
-H init.t
-H sub/1
-H sub/2
-EOF
-
-cat >expect.skip <<EOF
-S 1
-H 2
-H init.t
-S sub/1
-H sub/2
-EOF
-
-setup_absent() {
-	test -f 1 && rm 1
-	git update-index --remove 1 &&
-	git update-index --add --cacheinfo 100644 $EMPTY_BLOB 1 &&
-	git update-index --skip-worktree 1
-}
-
-test_absent() {
-	echo "100644 $EMPTY_BLOB 0	1" > expected &&
-	git ls-files --stage 1 > result &&
-	test_cmp expected result &&
-	test ! -f 1
-}
-
-setup_dirty() {
-	git update-index --force-remove 1 &&
-	echo dirty > 1 &&
-	git update-index --add --cacheinfo 100644 $EMPTY_BLOB 1 &&
-	git update-index --skip-worktree 1
-}
-
-test_dirty() {
-	echo "100644 $EMPTY_BLOB 0	1" > expected &&
-	git ls-files --stage 1 > result &&
-	test_cmp expected result &&
-	echo dirty > expected
-	test_cmp expected 1
-}
-
-test_expect_success 'setup' '
-	test_commit init &&
-	mkdir sub &&
-	touch ./1 ./2 sub/1 sub/2 &&
-	git add 1 2 sub/1 sub/2 &&
-	git update-index --skip-worktree 1 sub/1 &&
-	git ls-files -t > result &&
-	test_cmp expect.skip result
-'
-
-test_expect_success 'update-index' '
-	setup_absent &&
-	git update-index 1 &&
-	test_absent
-'
-
-test_expect_success 'update-index' '
-	setup_dirty &&
-	git update-index 1 &&
-	test_dirty
-'
-
-test_expect_success 'update-index --remove' '
-	setup_absent &&
-	git update-index --remove 1 &&
-	test -z "$(git ls-files 1)" &&
-	test ! -f 1
-'
-
-test_expect_success 'update-index --remove' '
-	setup_dirty &&
-	git update-index --remove 1 &&
-	test -z "$(git ls-files 1)" &&
-	echo dirty > expected &&
-	test_cmp expected 1
-'
-
-test_expect_success 'ls-files --deleted' '
-	setup_absent &&
-	test -z "$(git ls-files -d)"
-'
-
-test_expect_success 'ls-files --deleted' '
-	setup_dirty &&
-	test -z "$(git ls-files -d)"
-'
-
-test_expect_success 'ls-files --modified' '
-	setup_absent &&
-	test -z "$(git ls-files -m)"
-'
-
-test_expect_success 'ls-files --modified' '
-	setup_dirty &&
-	test -z "$(git ls-files -m)"
-'
-
-test_expect_success 'grep with skip-worktree file' '
-	git update-index --no-skip-worktree 1 &&
-	echo test > 1 &&
-	git update-index 1 &&
-	git update-index --skip-worktree 1 &&
-	rm 1 &&
-	test "$(git grep --no-ext-grep test)" = "1:test"
-'
-
-echo ":000000 100644 $ZERO_OID $EMPTY_BLOB A	1" > expected
-test_expect_success 'diff-index does not examine skip-worktree absent entries' '
-	setup_absent &&
-	git diff-index HEAD -- 1 > result &&
-	test_cmp expected result
-'
-
-test_expect_success 'diff-index does not examine skip-worktree dirty entries' '
-	setup_dirty &&
-	git diff-index HEAD -- 1 > result &&
-	test_cmp expected result
-'
-
-test_expect_success 'diff-files does not examine skip-worktree absent entries' '
-	setup_absent &&
-	test -z "$(git diff-files -- one)"
-'
-
-test_expect_success 'diff-files does not examine skip-worktree dirty entries' '
-	setup_dirty &&
-	test -z "$(git diff-files -- one)"
-'
-
-test_expect_success 'git-rm succeeds on skip-worktree absent entries' '
-	setup_absent &&
-	git rm 1
-'
-
-test_expect_success 'commit on skip-worktree absent entries' '
-	git reset &&
-	setup_absent &&
-	test_must_fail git commit -m null 1
-'
-
-test_expect_success 'commit on skip-worktree dirty entries' '
-	git reset &&
-	setup_dirty &&
-	test_must_fail git commit -m null 1
-'
-
-test_done