git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] githooks documentation: post-checkout hook is also called after clone
@ 2009-03-22 16:44 Jens Lehmann
  2009-03-22 16:56 ` Pat Notz
  0 siblings, 1 reply; 2+ messages in thread
From: Jens Lehmann @ 2009-03-22 16:44 UTC (permalink / raw)
  To: git; +Cc: gitster, peff

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] githooks documentation: post-checkout hook is also called  after clone
  2009-03-22 16:44 [PATCH] githooks documentation: post-checkout hook is also called after clone Jens Lehmann
@ 2009-03-22 16:56 ` Pat Notz
  0 siblings, 0 replies; 2+ messages in thread
From: Pat Notz @ 2009-03-22 16:56 UTC (permalink / raw)
  To: Jens Lehmann; +Cc: git, gitster, peff

On Sun, Mar 22, 2009 at 10:44 AM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
> 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.
> +

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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-22 16:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-22 16:44 [PATCH] githooks documentation: post-checkout hook is also called after clone Jens Lehmann
2009-03-22 16:56 ` Pat Notz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).