* [RFC] git gui doesn't call post-checkout hook on checkout or clone
@ 2009-03-22 15:49 Jens Lehmann
2009-03-22 22:33 ` Jeff King
0 siblings, 1 reply; 3+ messages in thread
From: Jens Lehmann @ 2009-03-22 15:49 UTC (permalink / raw)
To: git; +Cc: gitster, spearce, peff
When checking out or cloning via git gui, the post-checkout
hook is not called. This is a bit unexpected ...
The reason is that git gui uses git read-tree with the -u
option and not git checkout and git clone. I changed git
read-tree to call the post-checkout hook when called with
-u and it seems to solve the problem. I would make a patch
for that if you want.
But is this the right way to do this? Seems like we could
surprise some users of git read-tree with this change in
behaviour.
(I hope i cc'ed the right people this time ;-)
Jens
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] git gui doesn't call post-checkout hook on checkout or clone
2009-03-22 15:49 [RFC] git gui doesn't call post-checkout hook on checkout or clone Jens Lehmann
@ 2009-03-22 22:33 ` Jeff King
2009-03-23 0:18 ` Shawn O. Pearce
0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2009-03-22 22:33 UTC (permalink / raw)
To: Jens Lehmann; +Cc: git, gitster, spearce
On Sun, Mar 22, 2009 at 04:49:05PM +0100, Jens Lehmann wrote:
> When checking out or cloning via git gui, the post-checkout
> hook is not called. This is a bit unexpected ...
>
> The reason is that git gui uses git read-tree with the -u
> option and not git checkout and git clone. I changed git
> read-tree to call the post-checkout hook when called with
> -u and it seems to solve the problem. I would make a patch
> for that if you want.
>
> But is this the right way to do this? Seems like we could
> surprise some users of git read-tree with this change in
> behaviour.
No, I think plumbing should not generally call hooks. The right solution
would be to have git-gui call the post-checkout hook.
-Peff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] git gui doesn't call post-checkout hook on checkout or clone
2009-03-22 22:33 ` Jeff King
@ 2009-03-23 0:18 ` Shawn O. Pearce
0 siblings, 0 replies; 3+ messages in thread
From: Shawn O. Pearce @ 2009-03-23 0:18 UTC (permalink / raw)
To: Jeff King; +Cc: Jens Lehmann, git, gitster
Jeff King <peff@peff.net> wrote:
> On Sun, Mar 22, 2009 at 04:49:05PM +0100, Jens Lehmann wrote:
>
> > When checking out or cloning via git gui, the post-checkout
> > hook is not called. This is a bit unexpected ...
...
> > But is this the right way to do this? Seems like we could
> > surprise some users of git read-tree with this change in
> > behaviour.
>
> No, I think plumbing should not generally call hooks. The right solution
> would be to have git-gui call the post-checkout hook.
+1. git-gui should be invoking the hook. It doesn't. Patches are
welcome. I don't really have time these days for doing my own
development on git-gui, but well coded patches are still accepted.
--
Shawn.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-23 0:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-22 15:49 [RFC] git gui doesn't call post-checkout hook on checkout or clone Jens Lehmann
2009-03-22 22:33 ` Jeff King
2009-03-23 0:18 ` Shawn O. Pearce
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).