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

Subsystems: documentation, the rest

DORMANTno replies

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Jens Lehmann <hidden>
Date: 2016-06-15 22:46:26

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

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

From: Pat Notz <hidden>
Date: 2016-06-15 22:46:26

On Sun, Mar 22, 2009 at 10:44 AM, Jens Lehmann [off-list ref] wrote:
quoted hunk
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 <redacted>
---
 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.
+
I don't think that's true if you clone with the --no-checkout (-n)
option though.
 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help