git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Richard Bronosky <Richard@Bronosky.com>
Cc: git@vger.kernel.org
Subject: Re: hooks not fired by a merge's auto-commit
Date: Thu, 29 Jul 2010 09:50:01 -0700	[thread overview]
Message-ID: <7vzkxatepy.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <AANLkTindr-y0uAu46FVEqtB5BLw9ZjB0y0ETwmW+8+PV@mail.gmail.com> (Richard Bronosky's message of "Wed\, 28 Jul 2010 21\:25\:36 -0400")

Richard Bronosky <Richard@Bronosky.com> writes:

> Using git 1.7.1 it seems that a merge (more specifically the
> auto-commit) does not fire any of the following hooks:
> pre-commit  prepare-commit-msg commit-msg
>
> Is that by design?

I would probably call it an unintended design that now has long been
established that changing it may break people's existing setups rather
badly.

Especially pre-commit hooks that look for and prevent common mistakes from
happening for individual developers may not want to run, when you are
pulling in other people's work that already has the mess they created.
Such problems are often either too late to fix or you are in no position
to reject their pull requests.  So you would break _my_ workflow (and
others who play similar roles as me, making changes themselves and merging
others work) if you did such a change.

You _could_ add pre-merge to introduce it as a new feature.  For people
who want to apply the same check for merges and individual commits
(e.g. those who never merge other's work), pre-merge can just invoke
pre-commit.

  reply	other threads:[~2010-07-29 16:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29  1:25 hooks not fired by a merge's auto-commit Richard Bronosky
2010-07-29 16:50 ` Junio C Hamano [this message]
2010-08-01 23:27   ` Jay Soffian

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=7vzkxatepy.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Richard@Bronosky.com \
    --cc=git@vger.kernel.org \
    /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).