git gui doesn't call post-checkout hook on checkout or clone
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
Quoted 9 lines · Jens Lehmann
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.
Quoted 3 lines
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
Quoted 4 lines · Jeff King
Quoted 2 lines · Jens Lehmann
When checking out or cloning via git gui, the post-checkout hook is not called. This is a bit unexpected ...
...
Quoted 6 lines
Quoted 3 lines
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.
Signature · 1 line
Shawn.