Merge branch 'sg/test-rebase-editor-fix' into maint
* sg/test-rebase-editor-fix: t3404-rebase-interactive: test abbreviated commandsmaint
commit
a4830a7a45
|
@ -47,9 +47,9 @@ set_fake_editor () {
|
||||||
action=pick
|
action=pick
|
||||||
for line in $FAKE_LINES; do
|
for line in $FAKE_LINES; do
|
||||||
case $line in
|
case $line in
|
||||||
pick|squash|fixup|edit|reword|drop)
|
pick|p|squash|s|fixup|f|edit|e|reword|r|drop|d)
|
||||||
action="$line";;
|
action="$line";;
|
||||||
exec*)
|
exec_*|x_*)
|
||||||
echo "$line" | sed 's/_/ /g' >> "$1";;
|
echo "$line" | sed 's/_/ /g' >> "$1";;
|
||||||
"#")
|
"#")
|
||||||
echo '# comment' >> "$1";;
|
echo '# comment' >> "$1";;
|
||||||
|
|
|
@ -114,7 +114,7 @@ test_expect_success 'rebase -i with exec allows git commands in subdirs' '
|
||||||
git checkout master &&
|
git checkout master &&
|
||||||
mkdir subdir && (cd subdir &&
|
mkdir subdir && (cd subdir &&
|
||||||
set_fake_editor &&
|
set_fake_editor &&
|
||||||
FAKE_LINES="1 exec_cd_subdir_&&_git_rev-parse_--is-inside-work-tree" \
|
FAKE_LINES="1 x_cd_subdir_&&_git_rev-parse_--is-inside-work-tree" \
|
||||||
git rebase -i HEAD^
|
git rebase -i HEAD^
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
@ -515,7 +515,7 @@ test_expect_success 'squash works as expected' '
|
||||||
git checkout -b squash-works no-conflict-branch &&
|
git checkout -b squash-works no-conflict-branch &&
|
||||||
one=$(git rev-parse HEAD~3) &&
|
one=$(git rev-parse HEAD~3) &&
|
||||||
set_fake_editor &&
|
set_fake_editor &&
|
||||||
FAKE_LINES="1 squash 3 2" EXPECT_HEADER_COUNT=2 \
|
FAKE_LINES="1 s 3 2" EXPECT_HEADER_COUNT=2 \
|
||||||
git rebase -i HEAD~3 &&
|
git rebase -i HEAD~3 &&
|
||||||
test $one = $(git rev-parse HEAD~2)
|
test $one = $(git rev-parse HEAD~2)
|
||||||
'
|
'
|
||||||
|
@ -748,7 +748,7 @@ test_expect_success 'reword' '
|
||||||
git show HEAD^ | grep "D changed" &&
|
git show HEAD^ | grep "D changed" &&
|
||||||
FAKE_LINES="reword 1 2 3 4" FAKE_COMMIT_MESSAGE="B changed" git rebase -i A &&
|
FAKE_LINES="reword 1 2 3 4" FAKE_COMMIT_MESSAGE="B changed" git rebase -i A &&
|
||||||
git show HEAD~3 | grep "B changed" &&
|
git show HEAD~3 | grep "B changed" &&
|
||||||
FAKE_LINES="1 reword 2 3 4" FAKE_COMMIT_MESSAGE="C changed" git rebase -i A &&
|
FAKE_LINES="1 r 2 pick 3 p 4" FAKE_COMMIT_MESSAGE="C changed" git rebase -i A &&
|
||||||
git show HEAD~2 | grep "C changed"
|
git show HEAD~2 | grep "C changed"
|
||||||
'
|
'
|
||||||
|
|
||||||
|
@ -774,7 +774,7 @@ test_expect_success 'rebase -i can copy notes over a fixup' '
|
||||||
git reset --hard n3 &&
|
git reset --hard n3 &&
|
||||||
git notes add -m"an earlier note" n2 &&
|
git notes add -m"an earlier note" n2 &&
|
||||||
set_fake_editor &&
|
set_fake_editor &&
|
||||||
GIT_NOTES_REWRITE_MODE=concatenate FAKE_LINES="1 fixup 2" git rebase -i n1 &&
|
GIT_NOTES_REWRITE_MODE=concatenate FAKE_LINES="1 f 2" git rebase -i n1 &&
|
||||||
git notes show > output &&
|
git notes show > output &&
|
||||||
test_cmp expect output
|
test_cmp expect output
|
||||||
'
|
'
|
||||||
|
@ -1251,7 +1251,7 @@ rebase_setup_and_clean () {
|
||||||
test_expect_success 'drop' '
|
test_expect_success 'drop' '
|
||||||
rebase_setup_and_clean drop-test &&
|
rebase_setup_and_clean drop-test &&
|
||||||
set_fake_editor &&
|
set_fake_editor &&
|
||||||
FAKE_LINES="1 drop 2 3 drop 4 5" git rebase -i --root &&
|
FAKE_LINES="1 drop 2 3 d 4 5" git rebase -i --root &&
|
||||||
test E = $(git cat-file commit HEAD | sed -ne \$p) &&
|
test E = $(git cat-file commit HEAD | sed -ne \$p) &&
|
||||||
test C = $(git cat-file commit HEAD^ | sed -ne \$p) &&
|
test C = $(git cat-file commit HEAD^ | sed -ne \$p) &&
|
||||||
test A = $(git cat-file commit HEAD^^ | sed -ne \$p)
|
test A = $(git cat-file commit HEAD^^ | sed -ne \$p)
|
||||||
|
|
Loading…
Reference in New Issue