git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCHv2 1/4] merge: document prepare-commit-msg hook usage

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Sep 6, 2012, 14:25 UTC
Message-ID
<f64d15fe61f1e9d755a7afbe015d1b0dbf5f706d.1346939542.git.git@drmicha.warpmail.net>
In-Reply-To
<50487F8A.4050803@alum.mit.edu>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 Documentation/git-merge.txt | 5 +++++
 Documentation/githooks.txt  | 2 ++
 2 files changed, 7 insertions(+)
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
index 20f9228..b3ba8a8 100644
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -308,6 +308,11 @@ branch.<name>.mergeoptions::
 	supported options are the same as those of 'git merge', but option
 	values containing whitespace characters are currently not supported.
 
+HOOKS
+-----
+This command can run the `prepare-commit-msg` hook.
+See linkgit:githooks[5] for more information.
+
 SEE ALSO
 --------
 linkgit:git-fmt-merge-msg[1], linkgit:git-pull[1],
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index b9003fe..b32134c 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -108,6 +108,8 @@ it is not suppressed by the `--no-verify` option.  A non-zero exit
 means a failure of the hook and aborts the commit.  It should not
 be used as replacement for pre-commit hook.
 
+This hook is also called by 'git merge' when it creates a new commit.
+
 The sample `prepare-commit-msg` hook that comes with git comments
 out the `Conflicts:` part of a merge's commit message.
 
-- 
1.7.12.406.gafd3f81
Previous: Michael J GruberNext: Michael J Gruber
Message 7 of 16 in “pre-merge-hook”
  1. 0/3 pre-merge-hookMichael J Gruber, Sep 5, 2012
  2. 1/3 git-merge: Honor pre-merge hookMichael J Gruber, Sep 5, 2012
  3. Michael HaggertySep 5, 2012
  4. Michael J GruberSep 6, 2012
  5. Michael HaggertySep 6, 2012
  6. 0/4 pre-commit hook for mergesMichael J Gruber, Sep 6, 2012
  7. 1/4 merge: document prepare-commit-msg hook usageMichael J Gruber, Sep 6, 2012
  8. 2/4 git-merge: Honor pre-commit hook based on configMichael J Gruber, Sep 6, 2012
  9. 3/4 merge: --no-verify to bypass pre-commit hookMichael J Gruber, Sep 6, 2012
  10. 4/4 t7503: add tests for pre-commit hook (merge)Michael J Gruber, Sep 6, 2012
  11. 2/3 merge: --no-verify to bypass pre-merge hookMichael J Gruber, Sep 5, 2012
  12. 3/3 t7503: add tests for pre-merge-hookMichael J Gruber, Sep 5, 2012
  13. Junio C HamanoSep 6, 2012
  14. Michael J GruberSep 6, 2012
  15. Junio C HamanoSep 6, 2012
  16. Michael J GruberSep 7, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.