about summary refs log tree commit diff
path: root/third_party/git/t/t3702-add-edit.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/t3702-add-edit.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/t3702-add-edit.sh')
-rwxr-xr-xthird_party/git/t/t3702-add-edit.sh127
1 files changed, 0 insertions, 127 deletions
diff --git a/third_party/git/t/t3702-add-edit.sh b/third_party/git/t/t3702-add-edit.sh
deleted file mode 100755
index 6c676645d837..000000000000
--- a/third_party/git/t/t3702-add-edit.sh
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2007 Johannes E. Schindelin
-#
-
-test_description='add -e basic tests'
-. ./test-lib.sh
-
-
-cat > file << EOF
-LO, praise of the prowess of people-kings
-of spear-armed Danes, in days long sped,
-we have heard, and what honor the athelings won!
-Oft Scyld the Scefing from squadroned foes,
-from many a tribe, the mead-bench tore,
-awing the earls. Since erst he lay
-friendless, a foundling, fate repaid him:
-for he waxed under welkin, in wealth he throve,
-till before him the folk, both far and near,
-who house by the whale-path, heard his mandate,
-gave him gifts:  a good king he!
-EOF
-
-cat > second-part << EOF
-To him an heir was afterward born,
-a son in his halls, whom heaven sent
-to favor the folk, feeling their woe
-that erst they had lacked an earl for leader
-so long a while; the Lord endowed him,
-the Wielder of Wonder, with world's renown.
-EOF
-
-test_expect_success 'setup' '
-
-	git add file &&
-	test_tick &&
-	git commit -m initial file
-
-'
-
-cat > expected-patch << EOF
-diff --git a/file b/file
---- a/file
-+++ b/file
-@@ -1,11 +1,6 @@
--LO, praise of the prowess of people-kings
--of spear-armed Danes, in days long sped,
--we have heard, and what honor the athelings won!
--Oft Scyld the Scefing from squadroned foes,
--from many a tribe, the mead-bench tore,
--awing the earls. Since erst he lay
--friendless, a foundling, fate repaid him:
--for he waxed under welkin, in wealth he throve,
--till before him the folk, both far and near,
--who house by the whale-path, heard his mandate,
--gave him gifts:  a good king he!
-+To him an heir was afterward born,
-+a son in his halls, whom heaven sent
-+to favor the folk, feeling their woe
-+that erst they had lacked an earl for leader
-+so long a while; the Lord endowed him,
-+the Wielder of Wonder, with world's renown.
-EOF
-
-cat > patch << EOF
-diff --git a/file b/file
-index b9834b5..ef6e94c 100644
---- a/file
-+++ b/file
-@@ -3,1 +3,333 @@ of spear-armed Danes, in days long sped,
- we have heard, and what honor the athelings won!
-+
- Oft Scyld the Scefing from squadroned foes,
-@@ -2,7 +1,5 @@ awing the earls. Since erst he lay
- friendless, a foundling, fate repaid him:
-+
- for he waxed under welkin, in wealth he throve,
-EOF
-
-cat > expected << EOF
-diff --git a/file b/file
---- a/file
-+++ b/file
-@@ -1,10 +1,12 @@
- LO, praise of the prowess of people-kings
- of spear-armed Danes, in days long sped,
- we have heard, and what honor the athelings won!
-+
- Oft Scyld the Scefing from squadroned foes,
- from many a tribe, the mead-bench tore,
- awing the earls. Since erst he lay
- friendless, a foundling, fate repaid him:
-+
- for he waxed under welkin, in wealth he throve,
- till before him the folk, both far and near,
- who house by the whale-path, heard his mandate,
-EOF
-
-echo "#!$SHELL_PATH" >fake-editor.sh
-cat >> fake-editor.sh <<\EOF
-egrep -v '^index' "$1" >orig-patch &&
-mv -f patch "$1"
-EOF
-
-test_set_editor "$(pwd)/fake-editor.sh"
-chmod a+x fake-editor.sh
-
-test_expect_success 'add -e' '
-
-	cp second-part file &&
-	git add -e &&
-	test_cmp second-part file &&
-	test_cmp expected-patch orig-patch &&
-	git diff --cached >actual &&
-	grep -v index actual >out &&
-	test_cmp expected out
-
-'
-
-test_expect_success 'add -e notices editor failure' '
-	git reset --hard &&
-	echo change >>file &&
-	test_must_fail env GIT_EDITOR=false git add -e &&
-	test_expect_code 1 git diff --exit-code
-'
-
-test_done