summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJay Soffian <jaysoffian@gmail.com>2011-02-15 01:07:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-02-15 21:35:35 (GMT)
commit65969d43d10512a44f5e7248e4404b946d1d0d9f (patch)
tree9b9d06d73f8fa67afb230c42959de0c33bfbf3fd /t
parent7ed863a85a6ce2c4ac4476848310b8f917ab41f9 (diff)
downloadgit-65969d43d10512a44f5e7248e4404b946d1d0d9f.zip
git-65969d43d10512a44f5e7248e4404b946d1d0d9f.tar.gz
git-65969d43d10512a44f5e7248e4404b946d1d0d9f.tar.bz2
merge: honor prepare-commit-msg hook
When a merge is stopped due to conflicts or --no-commit, the subsequent commit calls the prepare-commit-msg hook. However, it is not called after a clean merge. Fix this inconsistency by invoking the hook after clean merges as well. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t7505-prepare-commit-msg-hook.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh
index ff18962..5b4b694 100755
--- a/t/t7505-prepare-commit-msg-hook.sh
+++ b/t/t7505-prepare-commit-msg-hook.sh
@@ -132,6 +132,18 @@ test_expect_success 'with hook (-c)' '
'
+test_expect_success 'with hook (merge)' '
+
+ head=`git rev-parse HEAD` &&
+ git checkout -b other HEAD@{1} &&
+ echo "more" >> file &&
+ git add file &&
+ git commit -m other &&
+ git checkout - &&
+ git merge other &&
+ test "`git log -1 --pretty=format:%s`" = merge
+'
+
cat > "$HOOK" <<'EOF'
#!/bin/sh
exit 1