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

2 messages from 2009-03-22 to 2009-03-22. Participants: Jens Lehmann, Junio C Hamano.
Thread: https://gitlist.dev/t/18469

## Jens Lehmann, 2009-03-22 18:46

Subject: [PATCH v2] githooks documentation: post-checkout hook is also called after clone
Message-ID: <49C6878E.8060509@web.de>
URL: https://gitlist.dev/e/49C6878E.8060509%40web.de

```
The documentation of the post-checkout hook just talks
about git-checkout. But recently git-clone was changed to
call it too, unless the -no-checkout (-n) option is used.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
---


Thanks to Pat Notz for noticing that the hook is not called
on clone when the --no-checkout (-n) option is used.


 Documentation/githooks.txt |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 1fd512b..1c73673 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -151,6 +151,10 @@ 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', unless the --no-checkout (-n) option is
+used. 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

```

## Junio C Hamano, 2009-03-22 21:59

Subject: Re: [PATCH v2] githooks documentation: post-checkout hook is also called after clone
Message-ID: <7vfxh5cj7x.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vfxh5cj7x.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <49C6878E.8060509@web.de>

```
Thanks, both.

```
