Re: Why there is no pre-checkout hook?

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

 



Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

> Ãscar Fuentes wrote:
>
>> [Subject: Why there is no pre-checkout hook?]
>
> Because you can use your script in place of "git checkout".
>
> Or: because no one's come up with a compelling use case for
> one.
>
> Or: because no one implemented it and demonstrated how to
> use it yet.
>
> Take your pick. :)

The first one is the most correct answer from historical standpoint for
almost any command, as git was designed to be scripted, and if you need
pre-frotz to always run before running frotz you should be doing that
before running frotz yoruself.  The same for post-frotz that would
unconditionally run after you run frotz.

Google/Bing/Gmane Search for "five valid reasons for git hook" ;-)

Having said that, I think it may be a good time to start thinking about
loosening the criteria, especially unconditional pre- and post- ones,
around Porcelain commands.  The "five valid reasons" criteria apply to
plumbing where you have more control and freedom and we do not want to
spend extra cycles even to check for non-existence of hooks.



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]