Skip to content

Commit b3635c1

Browse files
committed
Merge branch 'sg/test-rebase-editor-fix'
* sg/test-rebase-editor-fix: t3404-rebase-interactive: test abbreviated commands
2 parents 1f8e7dc + 8c64bc9 commit b3635c1

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*|break|b)
52+
exec_*|x_*|break|b)
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
@@ -124,7 +124,7 @@ test_expect_success 'rebase -i with exec allows git commands in subdirs' '
124124
git checkout master &&
125125
mkdir subdir && (cd subdir &&
126126
set_fake_editor &&
127-
FAKE_LINES="1 exec_cd_subdir_&&_git_rev-parse_--is-inside-work-tree" \
127+
FAKE_LINES="1 x_cd_subdir_&&_git_rev-parse_--is-inside-work-tree" \
128128
git rebase -i HEAD^
129129
)
130130
'
@@ -525,7 +525,7 @@ test_expect_success 'squash works as expected' '
525525
git checkout -b squash-works no-conflict-branch &&
526526
one=$(git rev-parse HEAD~3) &&
527527
set_fake_editor &&
528-
FAKE_LINES="1 squash 3 2" EXPECT_HEADER_COUNT=2 \
528+
FAKE_LINES="1 s 3 2" EXPECT_HEADER_COUNT=2 \
529529
git rebase -i HEAD~3 &&
530530
test $one = $(git rev-parse HEAD~2)
531531
'
@@ -758,7 +758,7 @@ test_expect_success 'reword' '
758758
git show HEAD^ | grep "D changed" &&
759759
FAKE_LINES="reword 1 2 3 4" FAKE_COMMIT_MESSAGE="B changed" git rebase -i A &&
760760
git show HEAD~3 | grep "B changed" &&
761-
FAKE_LINES="1 reword 2 3 4" FAKE_COMMIT_MESSAGE="C changed" git rebase -i A &&
761+
FAKE_LINES="1 r 2 pick 3 p 4" FAKE_COMMIT_MESSAGE="C changed" git rebase -i A &&
762762
git show HEAD~2 | grep "C changed"
763763
'
764764

@@ -784,7 +784,7 @@ test_expect_success 'rebase -i can copy notes over a fixup' '
784784
git reset --hard n3 &&
785785
git notes add -m"an earlier note" n2 &&
786786
set_fake_editor &&
787-
GIT_NOTES_REWRITE_MODE=concatenate FAKE_LINES="1 fixup 2" git rebase -i n1 &&
787+
GIT_NOTES_REWRITE_MODE=concatenate FAKE_LINES="1 f 2" git rebase -i n1 &&
788788
git notes show > output &&
789789
test_cmp expect output
790790
'
@@ -1261,7 +1261,7 @@ rebase_setup_and_clean () {
12611261
test_expect_success 'drop' '
12621262
rebase_setup_and_clean drop-test &&
12631263
set_fake_editor &&
1264-
FAKE_LINES="1 drop 2 3 drop 4 5" git rebase -i --root &&
1264+
FAKE_LINES="1 drop 2 3 d 4 5" git rebase -i --root &&
12651265
test E = $(git cat-file commit HEAD | sed -ne \$p) &&
12661266
test C = $(git cat-file commit HEAD^ | sed -ne \$p) &&
12671267
test A = $(git cat-file commit HEAD^^ | sed -ne \$p)

0 commit comments

Comments
 (0)