summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-03-22 16:01:19 +0100
committerJunio C Hamano <gitster@pobox.com>2017-03-22 11:25:49 -0700
commitcb7fb9ed4277f3e1e9203777d4de0805cf29f873 (patch)
treee1eadcae2bb4738499ca43535b5ab505fcbc9ac2
parent994292130121175dcb53f72541b7445e4b054d75 (diff)
downloadgit-cb7fb9ed4277f3e1e9203777d4de0805cf29f873.tar.gz
t7504: document regression: reword no longer calls commit-msg
The `reword` command of an interactive rebase used to call the commit-msg hooks, but that regressed when we switched to the rebase--helper backed by the sequencer. Noticed by Sebastian Schuberth. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t7504-commit-msg-hook.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t7504-commit-msg-hook.sh b/t/t7504-commit-msg-hook.sh
index 8728db61d3..c3d9ab02a3 100755
--- a/t/t7504-commit-msg-hook.sh
+++ b/t/t7504-commit-msg-hook.sh
@@ -220,4 +220,21 @@ test_expect_success "hook doesn't edit commit message (editor)" '
'
+# set up fake editor to replace `pick` by `reword`
+cat > reword-editor <<'EOF'
+#!/bin/sh
+mv "$1" "$1".bup &&
+sed 's/^pick/reword/' <"$1".bup >"$1"
+EOF
+chmod +x reword-editor
+REWORD_EDITOR="$(pwd)/reword-editor"
+export REWORD_EDITOR
+
+test_expect_failure 'hook is called for reword during `rebase -i`' '
+
+ GIT_SEQUENCE_EDITOR="\"$REWORD_EDITOR\"" git rebase -i HEAD^ &&
+ commit_msg_is "new message"
+
+'
+
test_done