Re: git merge auto-commit doesn't fire pre-commit hook

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

 



On Wed, Feb 16, 2011 at 5:49 PM, Liam Clarke
<liam.clarke-hutchinson@xxxxxxxxxxxxx> wrote:
> How exactly does git merge execute the commit?

Merge calls commit_tree directly, so the standard commit hooks are bypassed.

>  Does it use --no-verify at all? I've got a pre-commit hook to filter out testing data when merging into master, and if you merge with --no-commit, and then manually commit, the hook fires fine, but when merge autocommits, the hook doesn't get executed at all. Is there any other way to catch this event? I can add --no-commit to the branch.master.mergeoptions I suppose, but I don't want to add too much hassle for our Git users (if they're not checking in test data, of course).

I recently fixed this for prepare-commit-msg since that was the one I
cared about. See
http://thread.gmane.org/gmane.comp.version-control.git/151297 and
http://thread.gmane.org/gmane.comp.version-control.git/166805

j.
--
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]