about summary refs log tree commit diff
path: root/third_party/git/t/t7402-submodule-rebase.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/t7402-submodule-rebase.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/t7402-submodule-rebase.sh')
-rwxr-xr-xthird_party/git/t/t7402-submodule-rebase.sh118
1 files changed, 0 insertions, 118 deletions
diff --git a/third_party/git/t/t7402-submodule-rebase.sh b/third_party/git/t/t7402-submodule-rebase.sh
deleted file mode 100755
index 8e32f1900774..000000000000
--- a/third_party/git/t/t7402-submodule-rebase.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2008 Johannes Schindelin
-#
-
-test_description='Test rebasing, stashing, etc. with submodules'
-
-. ./test-lib.sh
-
-test_expect_success setup '
-
-	echo file > file &&
-	git add file &&
-	test_tick &&
-	git commit -m initial &&
-	git clone . submodule &&
-	git add submodule &&
-	test_tick &&
-	git commit -m submodule &&
-	echo second line >> file &&
-	(cd submodule && git pull) &&
-	test_tick &&
-	git commit -m file-and-submodule -a &&
-	git branch added-submodule
-
-'
-
-test_expect_success 'rebase with a dirty submodule' '
-
-	(cd submodule &&
-	 echo 3rd line >> file &&
-	 test_tick &&
-	 git commit -m fork -a) &&
-	echo unrelated >> file2 &&
-	git add file2 &&
-	test_tick &&
-	git commit -m unrelated file2 &&
-	echo other line >> file &&
-	test_tick &&
-	git commit -m update file &&
-	CURRENT=$(cd submodule && git rev-parse HEAD) &&
-	EXPECTED=$(git rev-parse HEAD~2:submodule) &&
-	GIT_TRACE=1 git rebase --onto HEAD~2 HEAD^ &&
-	STORED=$(git rev-parse HEAD:submodule) &&
-	test $EXPECTED = $STORED &&
-	test $CURRENT = $(cd submodule && git rev-parse HEAD)
-
-'
-
-cat > fake-editor.sh << \EOF
-#!/bin/sh
-echo $EDITOR_TEXT
-EOF
-chmod a+x fake-editor.sh
-
-test_expect_success 'interactive rebase with a dirty submodule' '
-
-	test submodule = $(git diff --name-only) &&
-	HEAD=$(git rev-parse HEAD) &&
-	GIT_EDITOR="\"$(pwd)/fake-editor.sh\"" EDITOR_TEXT="pick $HEAD" \
-		git rebase -i HEAD^ &&
-	test submodule = $(git diff --name-only)
-
-'
-
-test_expect_success 'rebase with dirty file and submodule fails' '
-
-	echo yet another line >> file &&
-	test_tick &&
-	git commit -m next file &&
-	echo rewrite > file &&
-	test_tick &&
-	git commit -m rewrite file &&
-	echo dirty > file &&
-	test_must_fail git rebase --onto HEAD~2 HEAD^
-
-'
-
-test_expect_success 'stash with a dirty submodule' '
-
-	echo new > file &&
-	CURRENT=$(cd submodule && git rev-parse HEAD) &&
-	git stash &&
-	test new != $(cat file) &&
-	test submodule = $(git diff --name-only) &&
-	test $CURRENT = $(cd submodule && git rev-parse HEAD) &&
-	git stash apply &&
-	test new = $(cat file) &&
-	test $CURRENT = $(cd submodule && git rev-parse HEAD)
-
-'
-
-test_expect_success 'rebasing submodule that should conflict' '
-	git reset --hard &&
-	git checkout added-submodule &&
-	git add submodule &&
-	test_tick &&
-	git commit -m third &&
-	(
-		cd submodule &&
-		git commit --allow-empty -m extra
-	) &&
-	git add submodule &&
-	test_tick &&
-	git commit -m fourth &&
-
-	test_must_fail git rebase --onto HEAD^^ HEAD^ HEAD^0 &&
-	git ls-files -s submodule >actual &&
-	(
-		cd submodule &&
-		echo "160000 $(git rev-parse HEAD^) 1	submodule" &&
-		echo "160000 $(git rev-parse HEAD^^) 2	submodule" &&
-		echo "160000 $(git rev-parse HEAD) 3	submodule"
-	) >expect &&
-	test_cmp expect actual
-'
-
-test_done