From 43b1791ec601732ac31195df96781a848360a9ac Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 21 Sep 2021 13:03:01 +0300 Subject: chore(3p/git): Unvendor git and track patches instead 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 --- third_party/git/t/t7012-skip-worktree-writing.sh | 159 ----------------------- 1 file changed, 159 deletions(-) delete mode 100755 third_party/git/t/t7012-skip-worktree-writing.sh (limited to 'third_party/git/t/t7012-skip-worktree-writing.sh') diff --git a/third_party/git/t/t7012-skip-worktree-writing.sh b/third_party/git/t/t7012-skip-worktree-writing.sh deleted file mode 100755 index 7476781979..0000000000 --- a/third_party/git/t/t7012-skip-worktree-writing.sh +++ /dev/null @@ -1,159 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2008 Nguyễn Thái Ngọc Duy -# - -test_description='test worktree writing operations when skip-worktree is used' - -. ./test-lib.sh - -test_expect_success 'setup' ' - test_commit init && - echo modified >> init.t && - touch added && - git add init.t added && - git commit -m "modified and added" && - git tag top -' - -test_expect_success 'read-tree updates worktree, absent case' ' - git checkout -f top && - git update-index --skip-worktree init.t && - rm init.t && - git read-tree -m -u HEAD^ && - echo init > expected && - test_cmp expected init.t -' - -test_expect_success 'read-tree updates worktree, dirty case' ' - git checkout -f top && - git update-index --skip-worktree init.t && - echo dirty >> init.t && - test_must_fail git read-tree -m -u HEAD^ && - grep -q dirty init.t && - test "$(git ls-files -t init.t)" = "S init.t" && - git update-index --no-skip-worktree init.t -' - -test_expect_success 'read-tree removes worktree, absent case' ' - git checkout -f top && - git update-index --skip-worktree added && - rm added && - git read-tree -m -u HEAD^ && - test ! -f added -' - -test_expect_success 'read-tree removes worktree, dirty case' ' - git checkout -f top && - git update-index --skip-worktree added && - echo dirty >> added && - test_must_fail git read-tree -m -u HEAD^ && - grep -q dirty added && - test "$(git ls-files -t added)" = "S added" && - git update-index --no-skip-worktree added -' - -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 -} - -cat >expected < result && - test_cmp expected result -' - -test_expect_success 'git-add ignores worktree content' ' - setup_absent && - git add 1 && - test_absent -' - -test_expect_success 'git-add ignores worktree content' ' - setup_dirty && - git add 1 && - test_dirty -' - -test_expect_success 'git-rm fails if worktree is dirty' ' - setup_dirty && - test_must_fail git rm 1 && - test_dirty -' - -cat >expected < result && - test_i18ncmp expected result -' - -test_expect_success 'git-clean, dirty case' ' - setup_dirty && - git clean -n > result && - test_i18ncmp expected result -' - -test_expect_success '--ignore-skip-worktree-entries leaves worktree alone' ' - test_commit keep-me && - git update-index --skip-worktree keep-me.t && - rm keep-me.t && - - : ignoring the worktree && - git update-index --remove --ignore-skip-worktree-entries keep-me.t && - git diff-index --cached --exit-code HEAD && - - : not ignoring the worktree, a deletion is staged && - git update-index --remove keep-me.t && - test_must_fail git diff-index --cached --exit-code HEAD \ - --diff-filter=D -- keep-me.t -' - -#TODO test_expect_failure 'git-apply adds file' false -#TODO test_expect_failure 'git-apply updates file' false -#TODO test_expect_failure 'git-apply removes file' false -#TODO test_expect_failure 'git-mv to skip-worktree' false -#TODO test_expect_failure 'git-mv from skip-worktree' false -#TODO test_expect_failure 'git-checkout' false - -test_done -- cgit 1.4.1