Merge branch 'js/maint-merge-use-prepare-commit-msg-hook' into maint

* js/maint-merge-use-prepare-commit-msg-hook:
  merge: honor prepare-commit-msg hook
This commit is contained in:
Junio C Hamano
2011-03-16 16:47:25 -07:00
2 changed files with 41 additions and 8 deletions

View File

@ -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