Re: [PATCH] merge: Run commit-msg hook

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Orgad,

On Tue, 26 Jul 2016, Orgad Shaneh wrote:

> From: Orgad Shaneh <orgads@xxxxxxxxx>

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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]