Skip to content

Commit a4830a7

Browse files
committed
Merge branch 'sg/test-rebase-editor-fix' into maint
* sg/test-rebase-editor-fix: t3404-rebase-interactive: test abbreviated commands
2 parents 85eb0f1 + 8c64bc9 commit a4830a7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

t/lib-rebase.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ set_fake_editor () {
4747
action=pick
4848
for line in $FAKE_LINES; do
4949
case $line in
50-
pick|squash|fixup|edit|reword|drop)
50+
pick|p|squash|s|fixup|f|edit|e|reword|r|drop|d)
5151
action="$line";;
52-
exec*)
52+
exec_*|x_*)
5353
echo "$line" | sed 's/_/ /g' >> "$1";;
5454
"#")
5555
echo '# comment' >> "$1";;

t/t3404-rebase-interactive.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ test_expect_success 'rebase -i with exec allows git commands in subdirs' '
114114
git checkout master &&
115115
mkdir subdir && (cd subdir &&
116116
set_fake_editor &&
117-
FAKE_LINES="1 exec_cd_subdir_&&_git_rev-parse_--is-inside-work-tree" \
117+
FAKE_LINES="1 x_cd_subdir_&&_git_rev-parse_--is-inside-work-tree" \
118118
git rebase -i HEAD^
119119
)
120120
'
@@ -515,7 +515,7 @@ test_expect_success 'squash works as expected' '
515515
git checkout -b squash-works no-conflict-branch &&
516516
one=$(git rev-parse HEAD~3) &&
517517
set_fake_editor &&
518-
FAKE_LINES="1 squash 3 2" EXPECT_HEADER_COUNT=2 \
518+
FAKE_LINES="1 s 3 2" EXPECT_HEADER_COUNT=2 \
519519
git rebase -i HEAD~3 &&
520520
test $one = $(git rev-parse HEAD~2)
521521
'
@@ -748,7 +748,7 @@ test_expect_success 'reword' '
748748
git show HEAD^ | grep "D changed" &&
749749
FAKE_LINES="reword 1 2 3 4" FAKE_COMMIT_MESSAGE="B changed" git rebase -i A &&
750750
git show HEAD~3 | grep "B changed" &&
751-
FAKE_LINES="1 reword 2 3 4" FAKE_COMMIT_MESSAGE="C changed" git rebase -i A &&
751+
FAKE_LINES="1 r 2 pick 3 p 4" FAKE_COMMIT_MESSAGE="C changed" git rebase -i A &&
752752
git show HEAD~2 | grep "C changed"
753753
'
754754

@@ -774,7 +774,7 @@ test_expect_success 'rebase -i can copy notes over a fixup' '
774774
git reset --hard n3 &&
775775
git notes add -m"an earlier note" n2 &&
776776
set_fake_editor &&
777-
GIT_NOTES_REWRITE_MODE=concatenate FAKE_LINES="1 fixup 2" git rebase -i n1 &&
777+
GIT_NOTES_REWRITE_MODE=concatenate FAKE_LINES="1 f 2" git rebase -i n1 &&
778778
git notes show > output &&
779779
test_cmp expect output
780780
'
@@ -1251,7 +1251,7 @@ rebase_setup_and_clean () {
12511251
test_expect_success 'drop' '
12521252
rebase_setup_and_clean drop-test &&
12531253
set_fake_editor &&
1254-
FAKE_LINES="1 drop 2 3 drop 4 5" git rebase -i --root &&
1254+
FAKE_LINES="1 drop 2 3 d 4 5" git rebase -i --root &&
12551255
test E = $(git cat-file commit HEAD | sed -ne \$p) &&
12561256
test C = $(git cat-file commit HEAD^ | sed -ne \$p) &&
12571257
test A = $(git cat-file commit HEAD^^ | sed -ne \$p)

0 commit comments

Comments
 (0)