Re: commit-msg hook does not run on merge with --no-ff option

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

 



Valid point.  The way my project is set up I always get a conflict on
merge operations, so technically all my merges (except fast forward
merges) end with a git-commit, which of course runs the commit-msg
hook.  It seems everything is working as designed.  Shame there isn't
a merge-msg hook.

It seems I have no choice but to work around this issue.  Thanks for your help.

On Thu, Sep 14, 2017 at 8:50 PM, Kaartic Sivaraam
<kaarticsivaraam91196@xxxxxxxxx> wrote:
> On Tue, 2017-09-12 at 13:24 -0500, Joseph Dunne wrote:
>> Sorry I don't understand your question.  The commit-msg hook runs
>> properly in all cases except when I perform a merge with the --no-ff
>> option enabled.
>>
>
> It's working just as the documentation says it does (emphasis mine),
>
>
>     This hook is invoked by **git commit**, and can be bypassed with the --no-verify option.
>     It takes a single parameter, the name of the file that holds the proposed commit log
>     message. Exiting with a non-zero status causes the git commit to abort.
>
>
>     It says that 'commit-msg' hook is invoked only for a "commit" (it's not
>     a MERGE-msg hook you see, it doesn't exist anyway). In case you see the
>     hook getting invoked for a merge then that's an issue, I guess. For
>     what kind of merges do you see the 'commit-msg' hook getting invoked?
>
>         --
>         Kaartic



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

  Powered by Linux