about summary refs log tree commit diff
path: root/third_party/git/t/t6060-merge-index.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/t6060-merge-index.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/t6060-merge-index.sh')
-rwxr-xr-xthird_party/git/t/t6060-merge-index.sh99
1 files changed, 0 insertions, 99 deletions
diff --git a/third_party/git/t/t6060-merge-index.sh b/third_party/git/t/t6060-merge-index.sh
deleted file mode 100755
index ddf34f0115b0..000000000000
--- a/third_party/git/t/t6060-merge-index.sh
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/bin/sh
-
-test_description='basic git merge-index / git-merge-one-file tests'
-. ./test-lib.sh
-
-test_expect_success 'setup diverging branches' '
-	for i in 1 2 3 4 5 6 7 8 9 10; do
-		echo $i
-	done >file &&
-	git add file &&
-	git commit -m base &&
-	git tag base &&
-	sed s/2/two/ <file >tmp &&
-	mv tmp file &&
-	git commit -a -m two &&
-	git tag two &&
-	git checkout -b other HEAD^ &&
-	sed s/10/ten/ <file >tmp &&
-	mv tmp file &&
-	git commit -a -m ten &&
-	git tag ten
-'
-
-cat >expect-merged <<'EOF'
-1
-two
-3
-4
-5
-6
-7
-8
-9
-ten
-EOF
-
-test_expect_success 'read-tree does not resolve content merge' '
-	git read-tree -i -m base ten two &&
-	echo file >expect &&
-	git diff-files --name-only --diff-filter=U >unmerged &&
-	test_cmp expect unmerged
-'
-
-test_expect_success 'git merge-index git-merge-one-file resolves' '
-	git merge-index git-merge-one-file -a &&
-	git diff-files --name-only --diff-filter=U >unmerged &&
-	test_must_be_empty unmerged &&
-	test_cmp expect-merged file &&
-	git cat-file blob :file >file-index &&
-	test_cmp expect-merged file-index
-'
-
-test_expect_success 'setup bare merge' '
-	git clone --bare . bare.git &&
-	(cd bare.git &&
-	 GIT_INDEX_FILE=$PWD/merge.index &&
-	 export GIT_INDEX_FILE &&
-	 git read-tree -i -m base ten two
-	)
-'
-
-test_expect_success 'merge-one-file fails without a work tree' '
-	(cd bare.git &&
-	 GIT_INDEX_FILE=$PWD/merge.index &&
-	 export GIT_INDEX_FILE &&
-	 test_must_fail git merge-index git-merge-one-file -a
-	)
-'
-
-test_expect_success 'merge-one-file respects GIT_WORK_TREE' '
-	(cd bare.git &&
-	 mkdir work &&
-	 GIT_WORK_TREE=$PWD/work &&
-	 export GIT_WORK_TREE &&
-	 GIT_INDEX_FILE=$PWD/merge.index &&
-	 export GIT_INDEX_FILE &&
-	 git merge-index git-merge-one-file -a &&
-	 git cat-file blob :file >work/file-index
-	) &&
-	test_cmp expect-merged bare.git/work/file &&
-	test_cmp expect-merged bare.git/work/file-index
-'
-
-test_expect_success 'merge-one-file respects core.worktree' '
-	mkdir subdir &&
-	git clone . subdir/child &&
-	(cd subdir &&
-	 GIT_DIR=$PWD/child/.git &&
-	 export GIT_DIR &&
-	 git config core.worktree "$PWD/child" &&
-	 git read-tree -i -m base ten two &&
-	 git merge-index git-merge-one-file -a &&
-	 git cat-file blob :file >file-index
-	) &&
-	test_cmp expect-merged subdir/child/file &&
-	test_cmp expect-merged subdir/file-index
-'
-
-test_done