Re: [QUESTION] Tracking HEAD changes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 24, 2021 at 04:03:14PM -0500, Jeff King wrote:
> On Wed, Feb 24, 2021 at 10:21:55PM +0200, Yaron Wittenstein wrote:
> 
> > That indeed seems to do the trick.
> > I've done a little experiment and saw that when doing git reset the
> > hook gets called.
> > 
> > However, when switching branches the hook doesn't execute :(
> > 
> > I don't understand if it's intentional, since when I've moved to a new
> > branch HEAD pointed to another commit id.
> > The only workaround I see here is using the post-checkout hook in addition.
> 
> Hmm, I would have thought that the branch switch would trigger the hooks
> because they're updating HEAD. I wonder if that is a bug (or lack of
> feature :) ) in the transaction hooks, or something Patrick did
> intentionally.
> 
> -Peff

It was done semi-intentionally, or at least with the knowledge that
symrefs aren't covered. This is mostly because they're not covered by
the reference transaction mechanism itself.

But this again reminds me that I still have to update the documentation
of the hook to at least make it more explicit what's currently covered
and what's not.

Patrick

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux