Skip to content

Commit 8bedae4

Browse files
charvi-077gitster
authored andcommitted
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 <[email protected]> Mentored-by: Phillip Wood <[email protected]> Signed-off-by: Charvi Mendiratta <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3d1bda6 commit 8bedae4

File tree

1 file changed

+3
-27
lines changed

1 file changed

+3
-27
lines changed

t/t3437-rebase-fixup-options.sh

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -72,40 +72,16 @@ test_expect_success 'setup' '
7272
git commit --fixup=HEAD -a &&
7373
git tag B1 &&
7474
test_tick &&
75-
git commit --allow-empty -F - <<-EOF &&
76-
amend! B
77-
$EMPTY
78-
B
79-
$EMPTY
80-
edited 1
81-
EOF
75+
FAKE_COMMIT_AMEND="edited 1" git commit --fixup=reword:B &&
8276
test_tick &&
83-
git commit --allow-empty -F - <<-EOF &&
84-
amend! amend! B
85-
$EMPTY
86-
B
87-
$EMPTY
88-
edited 1
89-
$EMPTY
90-
edited 2
91-
EOF
77+
FAKE_COMMIT_AMEND="edited 2" git commit --fixup=reword:HEAD &&
9278
echo B2 >B &&
9379
test_tick &&
9480
FAKE_COMMIT_AMEND="edited squash" git commit --squash=HEAD -a &&
9581
git tag B2 &&
9682
echo B3 >B &&
9783
test_tick &&
98-
git commit -a -F - <<-EOF &&
99-
amend! amend! amend! B
100-
$EMPTY
101-
B
102-
$EMPTY
103-
edited 1
104-
$EMPTY
105-
edited 2
106-
$EMPTY
107-
edited 3
108-
EOF
84+
FAKE_COMMIT_AMEND="edited 3" git commit -a --fixup=amend:HEAD^ &&
10985
git tag B3 &&
11086
11187
GIT_AUTHOR_NAME="Rebase Author" &&

0 commit comments

Comments
 (0)