From: Sam Vilain <sam.vilain@catalyst.net.nz>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, elliot@catalyst.net.nz
Subject: Re: [PATCH] checkout: add 'pre-checkout' hook
Date: Wed, 14 Oct 2009 18:25:28 +1300 [thread overview]
Message-ID: <4AD560C8.8010108@catalyst.net.nz> (raw)
In-Reply-To: <20091014051319.GF31810@coredump.intra.peff.net>
Jeff King wrote:
>> Add a simple hook that will run before checkouts.
>
> What is the use case that makes it useful as a hook, and not simply as
> something people can do before running checkout?
>
> I guess you can use it to block a checkout, but only after finding out
> _what_ you are going to checkout, but an exact use case escapes me.
Right. Yes, this could be explained more.
Actually the use case is submodules. When switching branches, the user
wants to add a hook to remove submodules. However post-checkout is too
late, because the index and the .gitmodules file do not record the
submodule locations.
Of course the best explanation is a test case :) I'll look at cooking
one up.
--
Sam Vilain, Perl Hacker, Catalyst IT (NZ) Ltd.
phone: +64 4 499 2267 PGP ID: 0x66B25843
next prev parent reply other threads:[~2009-10-14 5:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-14 4:45 [PATCH] checkout: add 'pre-checkout' hook Sam Vilain
2009-10-14 5:13 ` Jeff King
2009-10-14 5:25 ` Sam Vilain [this message]
2009-10-14 5:13 ` Junio C Hamano
2009-10-14 5:22 ` Sam Vilain
2009-10-14 5:25 ` Jeff King
2009-10-14 6:49 ` Bert Wesarg
2009-10-14 6:50 ` Sam Vilain
2009-10-14 7:04 ` Bert Wesarg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AD560C8.8010108@catalyst.net.nz \
--to=sam.vilain@catalyst.net.nz \
--cc=elliot@catalyst.net.nz \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).