Most reliable method to detect a merge commit in pre-commit hook

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

 



Hi,

I'd like our pre-commit hook to skip some checks if the commit that's about to be made is a merge commit. What's the most reliable way to detect a merge commit from within a pre-commit hook script? Currently, the only way I see is to check whether .git/MERGE_MSG exists, but I'd feel safer to check whether the commit is going to have more than one parent or so. Is that possible / a better detection?

--
Sebastian Schuberth

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