{"thread":{"id":"18466","subject":"[RFC] git gui doesn't call post-checkout hook on checkout or clone","startedAt":"2009-03-22T15:49:05Z","lastAt":"2009-03-23T00:18:27Z","messageCount":3,"participants":["Jens Lehmann","Jeff King","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"108904","messageId":"49C65DF1.8030608@web.de","threadId":"18466","inReplyTo":null,"subject":"[RFC] git gui doesn't call post-checkout hook on checkout or clone","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2009-03-22T15:49:05Z","receivedAt":"2009-03-22T15:49:05Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"When checking out or cloning via git gui, the post-checkout\nhook is not called. This is a bit unexpected ...\n\nThe reason is that git gui uses git read-tree with the -u\noption and not git checkout and git clone. I changed git\nread-tree to call the post-checkout hook when called with\n-u and it seems to solve the problem. I would make a patch\nfor that if you want.\n\nBut is this the right way to do this? Seems like we could\nsurprise some users of git read-tree with this change in\nbehaviour.\n\n(I hope i cc'ed the right people this time ;-)\n\nJens\n"},{"id":"108945","messageId":"20090322223309.GA22428@sigill.intra.peff.net","threadId":"18466","inReplyTo":"49C65DF1.8030608@web.de","subject":"Re: [RFC] git gui doesn't call post-checkout hook on checkout or clone","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-03-22T22:33:09Z","receivedAt":"2009-03-22T22:33:09Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Mar 22, 2009 at 04:49:05PM +0100, Jens Lehmann wrote:\n\n> When checking out or cloning via git gui, the post-checkout\n> hook is not called. This is a bit unexpected ...\n> \n> The reason is that git gui uses git read-tree with the -u\n> option and not git checkout and git clone. I changed git\n> read-tree to call the post-checkout hook when called with\n> -u and it seems to solve the problem. I would make a patch\n> for that if you want.\n> \n> But is this the right way to do this? Seems like we could\n> surprise some users of git read-tree with this change in\n> behaviour.\n\nNo, I think plumbing should not generally call hooks. The right solution\nwould be to have git-gui call the post-checkout hook.\n\n-Peff\n"},{"id":"108965","messageId":"20090323001827.GG23521@spearce.org","threadId":"18466","inReplyTo":"20090322223309.GA22428@sigill.intra.peff.net","subject":"Re: [RFC] git gui doesn't call post-checkout hook on checkout or clone","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-03-23T00:18:27Z","receivedAt":"2009-03-23T00:18:27Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Jeff King <peff@peff.net> wrote:\n> On Sun, Mar 22, 2009 at 04:49:05PM +0100, Jens Lehmann wrote:\n> \n> > When checking out or cloning via git gui, the post-checkout\n> > hook is not called. This is a bit unexpected ...\n...\n> > But is this the right way to do this? Seems like we could\n> > surprise some users of git read-tree with this change in\n> > behaviour.\n> \n> No, I think plumbing should not generally call hooks. The right solution\n> would be to have git-gui call the post-checkout hook.\n\n+1.  git-gui should be invoking the hook.  It doesn't.  Patches are\nwelcome.  I don't really have time these days for doing my own\ndevelopment on git-gui, but well coded patches are still accepted.\n\n-- \nShawn.\n"}]}