From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Orgad Shaneh <orgads@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] merge: Run commit-msg hook
Date: Tue, 26 Jul 2016 15:02:50 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1607261456480.14111@virtualbox> (raw)
In-Reply-To: <1469519323-11420-1-git-send-email-orgad.shaneh@audiocodes.com>
Hi Orgad,
On Tue, 26 Jul 2016, Orgad Shaneh wrote:
> From: Orgad Shaneh <orgads@gmail.com>
Again, this is unnecessary if you already send the mail from the same
address.
> commit-msg is needed to either validate the commit message or edit it.
> Gerrit for instance uses this hook to append its Change-Id footer.
>
> This is relevant to merge commit just like any other commit.
Hmm. This is not very convincing to me, as
- if you call commit-msg in `git merge` now, why not `prepare-commit-msg`?
- a merge is a different beast from a simple commit. That is why we have
two different commands for them. A hook to edit the merge message may
need to know the *second* parent commit, too, for example to generate
a diffstat, or to add information about changes in an "evil commit".
- if Gerrit is the intended user, would it not make more sense to
introduce a new hook, e.g. `merge-msg` (and `prepare-merge-msg`), as you
have to teach Gerrit a new trick anyway?
- if Gerrit is the intended user, why does it not simply edit the merge
message itself? After all, it executes it, and probably crafts a merge
message mentioning that this is an automatic merge, anyway, so why not
add the Change-Id *then*?
Ciao,
Dscho
next prev parent reply other threads:[~2016-07-26 13:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-26 7:48 [PATCH] merge: Run commit-msg hook Orgad Shaneh
2016-07-26 13:02 ` Johannes Schindelin [this message]
2016-07-26 13:50 ` Orgad Shaneh
2016-07-26 14:54 ` Johannes Schindelin
2016-07-26 21:12 ` Junio C Hamano
[not found] ` <CAGHpTBLN1vBv12fSBXK0taGzxynMymBWRu8FcG=miBy=raReHw@mail.gmail.com>
2016-07-27 12:35 ` Johannes Schindelin
2016-07-26 21:05 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2016-07-26 15:32 Orgad Shaneh
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=alpine.DEB.2.20.1607261456480.14111@virtualbox \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=orgads@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).