{"thread":{"id":"18469","subject":"[PATCH v2] githooks documentation: post-checkout hook is also called after clone","startedAt":"2009-03-22T18:46:38Z","lastAt":"2009-03-22T21:59:14Z","messageCount":2,"participants":["Jens Lehmann","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"108920","messageId":"49C6878E.8060509@web.de","threadId":"18469","inReplyTo":null,"subject":"[PATCH v2] githooks documentation: post-checkout hook is also called after clone","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2009-03-22T18:46:38Z","receivedAt":"2009-03-22T18:46:38Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"The documentation of the post-checkout hook just talks\nabout git-checkout. But recently git-clone was changed to\ncall it too, unless the -no-checkout (-n) option is used.\n\nSigned-off-by: Jens Lehmann <Jens.Lehmann@web.de>\n---\n\n\nThanks to Pat Notz for noticing that the hook is not called\non clone when the --no-checkout (-n) option is used.\n\n\n Documentation/githooks.txt |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/githooks.txt b/Documentation/githooks.txt\nindex 1fd512b..1c73673 100644\n--- a/Documentation/githooks.txt\n+++ b/Documentation/githooks.txt\n@@ -151,6 +151,10 @@ indicating whether the checkout was a branch checkout (changing branches,\n flag=1) or a file checkout (retrieving a file from the index, flag=0).\n This hook cannot affect the outcome of 'git-checkout'.\n \n+It is also run after 'git-clone', unless the --no-checkout (-n) option is\n+used. The first parameter given to the hook is the null-ref, the second the\n+ref of the new HEAD and the flag is always 1.\n+\n This hook can be used to perform repository validity checks, auto-display\n differences from the previous HEAD if different, or set working dir metadata\n properties.\n-- \n1.6.2.1.275.ga797b\n"},{"id":"108940","messageId":"7vfxh5cj7x.fsf@gitster.siamese.dyndns.org","threadId":"18469","inReplyTo":"49C6878E.8060509@web.de","subject":"Re: [PATCH v2] githooks documentation: post-checkout hook is also called after clone","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-22T21:59:14Z","receivedAt":"2009-03-22T21:59:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks, both.\n"}]}