summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-30 14:07:17 -0700
committerJunio C Hamano <gitster@pobox.com>2017-03-30 14:07:17 -0700
commit4b945eea4098841a1d6ddb0884673b555cfdaab9 (patch)
tree54ad4a2cca1b85dbf73aad794d4da03a10bb7466 /t
parent3e8ff5e4f3fb0796b757730a9d64e848885d91c5 (diff)
parentb92ff6e81429c6a2636b4d6d26ab9ce5d4890fe8 (diff)
downloadgit-4b945eea4098841a1d6ddb0884673b555cfdaab9.tar.gz
Merge branch 'js/rebase-i-reword-to-run-hooks'
A recent update to "rebase -i" stopped running hooks for the "git commit" command during "reword" action, which has been fixed. * js/rebase-i-reword-to-run-hooks: sequencer: allow the commit-msg hooks to run during a `reword` sequencer: make commit options more extensible t7504: document regression: reword no longer calls commit-msg
Diffstat (limited to 't')
-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..88d4cda299 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_success 'hook is called for reword during `rebase -i`' '
+
+ GIT_SEQUENCE_EDITOR="\"$REWORD_EDITOR\"" git rebase -i HEAD^ &&
+ commit_msg_is "new message"
+
+'
+
test_done