git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: "Óscar Fuentes" <ofv@wanadoo.es>, git@vger.kernel.org
Subject: Re: Why there is no pre-checkout hook?
Date: Fri, 15 Oct 2010 15:46:44 -0700	[thread overview]
Message-ID: <7vr5fraxbf.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20101015083022.GA8763@burratino> (Jonathan Nieder's message of "Fri\, 15 Oct 2010 03\:30\:22 -0500")

Jonathan Nieder <jrnieder@gmail.com> 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.

      reply	other threads:[~2010-10-15 22:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-15  8:21 Why there is no pre-checkout hook? Óscar Fuentes
2010-10-15  8:30 ` Jonathan Nieder
2010-10-15 22:46   ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vr5fraxbf.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).