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:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2019-01-28 13:27:56 +0300
committerJunio C Hamano <gitster@pobox.com>2019-01-28 21:25:39 +0300
commit891d4a0313edc03f7e2ecb96edec5d30dc182294 (patch)
tree6094fbc114bab28699cd076c1ccbee65f64744fa /t/t7505-prepare-commit-msg-hook.sh
parent0d0ac3826a3bbb9247e39e12623bbcfdd722f24c (diff)
implicit interactive rebase: don't run sequence editor
If GIT_SEQUENCE_EDITOR is set then rebase runs it when executing implicit interactive rebases which are supposed to appear non-interactive to the user. Fix this by setting GIT_SEQUENCE_EDITOR=: rather than GIT_EDITOR=:. A couple of tests relied on the old behavior so they are updated to work with the new regime. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7505-prepare-commit-msg-hook.sh')
-rwxr-xr-xt/t7505-prepare-commit-msg-hook.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh
index ebfcad9c4c..ba8bd1b514 100755
--- a/t/t7505-prepare-commit-msg-hook.sh
+++ b/t/t7505-prepare-commit-msg-hook.sh
@@ -215,7 +215,7 @@ test_expect_success 'with hook and editor (merge)' '
test_rebase () {
expect=$1 &&
mode=$2 &&
- test_expect_$expect C_LOCALE_OUTPUT "with hook (rebase $mode)" '
+ test_expect_$expect C_LOCALE_OUTPUT "with hook (rebase ${mode:--i})" '
test_when_finished "\
git rebase --abort
git checkout -f master
@@ -225,7 +225,7 @@ test_rebase () {
GIT_EDITOR="\"$FAKE_EDITOR\"" &&
(
export GIT_SEQUENCE_EDITOR GIT_EDITOR &&
- test_must_fail git rebase $mode b &&
+ test_must_fail git rebase -i $mode b &&
echo x >a &&
git add a &&
test_must_fail git rebase --continue &&
@@ -241,18 +241,18 @@ test_rebase () {
git add b &&
git rebase --continue
) &&
- if test $mode = -p # reword amended after pick
+ if test "$mode" = -p # reword amended after pick
then
n=18
else
n=17
fi &&
git log --pretty=%s -g -n$n HEAD@{1} >actual &&
- test_cmp "$TEST_DIRECTORY/t7505/expected-rebase$mode" actual
+ test_cmp "$TEST_DIRECTORY/t7505/expected-rebase${mode:--i}" actual
'
}
-test_rebase success -i
+test_rebase success
test_have_prereq !REBASE_P || test_rebase success -p
test_expect_success 'with hook (cherry-pick)' '