Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharvi Mendiratta <charvi077@gmail.com>2021-03-15 10:54:35 +0300
committerJunio C Hamano <gitster@pobox.com>2021-03-16 00:29:36 +0300
commit8bedae4599fafa8ae8b2885454db7c4bb7660aeb (patch)
treea153003ce6462c956b50e3d05b2af10217beeb4b /t/t3437-rebase-fixup-options.sh
parent3d1bda6b5bed6b29723178b1b417b3a5abe62565 (diff)
t3437: use --fixup with options to create amend! commit
We taught `git commit --fixup` to create "amend!" commit. Let's also update the tests and use it to setup the rebase tests. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3437-rebase-fixup-options.sh')
-rwxr-xr-xt/t3437-rebase-fixup-options.sh30
1 files changed, 3 insertions, 27 deletions
diff --git a/t/t3437-rebase-fixup-options.sh b/t/t3437-rebase-fixup-options.sh
index a5a20354e3..d0bdc7ed02 100755
--- a/t/t3437-rebase-fixup-options.sh
+++ b/t/t3437-rebase-fixup-options.sh
@@ -72,40 +72,16 @@ test_expect_success 'setup' '
git commit --fixup=HEAD -a &&
git tag B1 &&
test_tick &&
- git commit --allow-empty -F - <<-EOF &&
- amend! B
- $EMPTY
- B
- $EMPTY
- edited 1
- EOF
+ FAKE_COMMIT_AMEND="edited 1" git commit --fixup=reword:B &&
test_tick &&
- git commit --allow-empty -F - <<-EOF &&
- amend! amend! B
- $EMPTY
- B
- $EMPTY
- edited 1
- $EMPTY
- edited 2
- EOF
+ FAKE_COMMIT_AMEND="edited 2" git commit --fixup=reword:HEAD &&
echo B2 >B &&
test_tick &&
FAKE_COMMIT_AMEND="edited squash" git commit --squash=HEAD -a &&
git tag B2 &&
echo B3 >B &&
test_tick &&
- git commit -a -F - <<-EOF &&
- amend! amend! amend! B
- $EMPTY
- B
- $EMPTY
- edited 1
- $EMPTY
- edited 2
- $EMPTY
- edited 3
- EOF
+ FAKE_COMMIT_AMEND="edited 3" git commit -a --fixup=amend:HEAD^ &&
git tag B3 &&
GIT_AUTHOR_NAME="Rebase Author" &&