git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	Dave Abrahams <dave@boostpro.com>,
	git@vger.kernel.org
Subject: Re: cherry-pick / pre-commit hook?
Date: Tue, 28 Dec 2010 14:38:20 -0800 (PST)	[thread overview]
Message-ID: <m3vd2djzhp.fsf@localhost.localdomain> (raw)
In-Reply-To: <7vy679wynd.fsf@alter.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:

> I think the basic direction could be (I haven't thought things through,
> just a strawman):
> 
>  - Allow --verify/--no-verify to all commands that possibly create a new
>    commit, and run pre-commit hook where an updated index is about to be
>    made into a commit (for some commands this may not be very easy);
> 
>  - The guideline of picking the default would probably look like this:
> 
>    (1) for existing commands, keep the current behaviour;
> 
>    (2) for a new command, --verify should be the default if the command is
>        primarily about letting the user do what s/he would/could/should
>        have done as "git commit" in the first place (e.g. cherry-picking
>        one's own commit from a separate branch or rebasing one's own
>        unpublished branch on top of updated upstream), and --no-verify
>        otherwise (i.e. taking other's work and using it in a context
>        different from the original).

Does it mean that for now (and perhaps also for later) it means that
"git commit" by default runs pre-commit hook, unless one use
--no-verify, and that all comands that create a new commit (rebase,
cherry-pick, revert, merge/pull) can request for pre-commit hook to be
run (if they create commit) with --verify?

I think it is a very good idea, though I don't know how difficult it
would be to make all commands that can create commit accept --verify..

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2010-12-28 22:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08 17:10 cherry-pick / pre-commit hook? Dave Abrahams
2010-12-08 17:53 ` Jonathan Nieder
2010-12-08 21:22   ` Dave Abrahams
2010-12-08 22:05     ` Jonathan Nieder
2010-12-27  2:18       ` Dave Abrahams
2010-12-27  9:37         ` Jonathan Nieder
2010-12-27 20:58           ` Junio C Hamano
2010-12-27 21:33             ` Dave Abrahams
2010-12-28 18:16           ` Junio C Hamano
2010-12-28 22:38             ` Jakub Narebski [this message]
2010-12-29  1:00               ` Dave Abrahams

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

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

  git send-email \
    --in-reply-to=m3vd2djzhp.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=dave@boostpro.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    /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.
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 NNTP newsgroup(s).