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

[PATCH] githooks documentation: post-checkout hook is also called after clone

From
Jens Lehmann <jens.lehmann@web.de>
Date
Mar 22, 2009, 16:44 UTC
Message-ID
<49C66B03.6020908@web.de>

The documentation of the post-checkout hook just talks about git-checkout. But recently git-clone was changed to call it too, so we have to document that in githooks.txt.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---
 Documentation/githooks.txt |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 1fd512b..76deefc 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -151,6 +151,9 @@ indicating whether the checkout was a branch checkout (changing branches,
 flag=1) or a file checkout (retrieving a file from the index, flag=0).
 This hook cannot affect the outcome of 'git-checkout'.
 
+It is also run after 'git-clone'. The first parameter given to the hook is
+the null-ref, the second the ref of the new HEAD and the flag is always 1.
+
 This hook can be used to perform repository validity checks, auto-display
 differences from the previous HEAD if different, or set working dir metadata
 properties.
-- 
1.6.2.1.275.ga797b
Next: Pat Notz
Message 1 of 2 in “githooks documentation: post-checkout hook is also called after clone”
  1. githooks documentation: post-checkout hook is also called after cloneJens Lehmann, Mar 22, 2009
  2. Pat NotzMar 22, 2009

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.