about summary refs log tree commit diff
path: root/third_party/git/t/t3904-stash-patch.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/t3904-stash-patch.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/t3904-stash-patch.sh')
-rwxr-xr-xthird_party/git/t/t3904-stash-patch.sh115
1 files changed, 0 insertions, 115 deletions
diff --git a/third_party/git/t/t3904-stash-patch.sh b/third_party/git/t/t3904-stash-patch.sh
deleted file mode 100755
index accfe3845c41..000000000000
--- a/third_party/git/t/t3904-stash-patch.sh
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/bin/sh
-
-test_description='stash -p'
-. ./lib-patch-mode.sh
-
-if ! test_have_prereq PERL
-then
-	skip_all='skipping stash -p tests, perl not available'
-	test_done
-fi
-
-test_expect_success 'setup' '
-	mkdir dir &&
-	echo parent > dir/foo &&
-	echo dummy > bar &&
-	echo committed > HEAD &&
-	git add bar dir/foo HEAD &&
-	git commit -m initial &&
-	test_tick &&
-	test_commit second dir/foo head &&
-	echo index > dir/foo &&
-	git add dir/foo &&
-	set_and_save_state bar bar_work bar_index &&
-	save_head
-'
-
-# note: order of files with unstaged changes: HEAD bar dir/foo
-
-test_expect_success 'saying "n" does nothing' '
-	set_state HEAD HEADfile_work HEADfile_index &&
-	set_state dir/foo work index &&
-	test_write_lines n n n | test_must_fail git stash save -p &&
-	verify_state HEAD HEADfile_work HEADfile_index &&
-	verify_saved_state bar &&
-	verify_state dir/foo work index
-'
-
-test_expect_success 'git stash -p' '
-	test_write_lines y n y | git stash save -p &&
-	verify_state HEAD committed HEADfile_index &&
-	verify_saved_state bar &&
-	verify_state dir/foo head index &&
-	git reset --hard &&
-	git stash apply &&
-	verify_state HEAD HEADfile_work committed &&
-	verify_state bar dummy dummy &&
-	verify_state dir/foo work head
-'
-
-test_expect_success 'git stash -p --no-keep-index' '
-	set_state HEAD HEADfile_work HEADfile_index &&
-	set_state bar bar_work bar_index &&
-	set_state dir/foo work index &&
-	test_write_lines y n y | git stash save -p --no-keep-index &&
-	verify_state HEAD committed committed &&
-	verify_state bar bar_work dummy &&
-	verify_state dir/foo head head &&
-	git reset --hard &&
-	git stash apply --index &&
-	verify_state HEAD HEADfile_work HEADfile_index &&
-	verify_state bar dummy bar_index &&
-	verify_state dir/foo work index
-'
-
-test_expect_success 'git stash --no-keep-index -p' '
-	set_state HEAD HEADfile_work HEADfile_index &&
-	set_state bar bar_work bar_index &&
-	set_state dir/foo work index &&
-	test_write_lines y n y | git stash save --no-keep-index -p &&
-	verify_state HEAD committed committed &&
-	verify_state dir/foo head head &&
-	verify_state bar bar_work dummy &&
-	git reset --hard &&
-	git stash apply --index &&
-	verify_state HEAD HEADfile_work HEADfile_index &&
-	verify_state bar dummy bar_index &&
-	verify_state dir/foo work index
-'
-
-test_expect_success 'stash -p --no-keep-index -- <pathspec> does not unstage other files' '
-	set_state HEAD HEADfile_work HEADfile_index &&
-	set_state dir/foo work index &&
-	echo y | git stash push -p --no-keep-index -- HEAD &&
-	verify_state HEAD committed committed &&
-	verify_state dir/foo work index
-'
-
-test_expect_success 'none of this moved HEAD' '
-	verify_saved_head
-'
-
-test_expect_success 'stash -p with split hunk' '
-	git reset --hard &&
-	cat >test <<-\EOF &&
-	aaa
-	bbb
-	ccc
-	EOF
-	git add test &&
-	git commit -m "initial" &&
-	cat >test <<-\EOF &&
-	aaa
-	added line 1
-	bbb
-	added line 2
-	ccc
-	EOF
-	printf "%s\n" s n y q |
-	git stash -p 2>error &&
-	test_must_be_empty error &&
-	grep "added line 1" test &&
-	! grep "added line 2" test
-'
-
-test_done