From: Dave Abrahams <dave@boostpro.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: cherry-pick / pre-commit hook?
Date: Sun, 26 Dec 2010 17:18:12 -0900 [thread overview]
Message-ID: <m2d3oo9cwr.wl%dave@boostpro.com> (raw)
In-Reply-To: <20101208220514.GA8865@burratino>
At Wed, 8 Dec 2010 16:05:14 -0600,
Jonathan Nieder wrote:
>
> The main purpose of the pre-commit and commit-msg hooks is to avoid
> introducing regressions in whitespace style, encoding, and so forth;
> and it would make cherry-picking unnecessarily difficult, without
> preventing regressions, to unconditionally apply the same standards to
> existing code. For this reason, in v0.99.6~51 (2005-08-29), git
> learned to skip the usual hooks when cherry-picking or reverting an
> existing commit.
>
> But sometimes the checks are wanted anyway. For example, with this
> patch applied, you can safely fetch some new contributor's code:
>
> $ git cherry-pick -s --verify HEAD..FETCH_HEAD
>
> while allowing the pre-commit and commit-msg hooks to run their usual
> checks so the result can error out if the patches are not clean.
>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> ---
> Untested. Please feel free to add some documentation and tests and
> submit it for real if this looks like a good idea. :)
Well, thanks, but sadly I can only invest enough time to file this bug
report right now: if you're going to have a "pre-commit hook" concept,
but not run that hook for some kinds of commits, then that fact needs
to be documented.
--
Dave Abrahams
BoostPro Computing
http://www.boostpro.com
next prev parent reply other threads:[~2010-12-27 2:19 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 [this message]
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
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=m2d3oo9cwr.wl%dave@boostpro.com \
--to=dave@boostpro.com \
--cc=git@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.