How do I control the automated commit message on a merge?

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

 



I am using git-svn. The SVN repository I'm dealing with has a standard
comment convention I must follow. It is a simple static string of
information that must appear on the first line of the commit message.
Everything else can be free-form.

I figured out how to add a commit template to my gitconfig file. So
for regular commits, I think I'm fine. But when Git does a merge (no
conflicts), it auto-generates a commit message like:

        Merge branch 'master' of  /path/to/other/repo

How can I change this so my required string gets written at the
beginning of the commit message. I played with the commit-msg and
prepare-commit-msg hooks, but it didn't seem to get triggered in the
merge case.

Also, having the prepare-commit-msg hook add text had the side-effect
that in my normal commits, the message was always accepted, even when
I wanted to abort (vi using :q!). In case I ever do need to use
prepare-commit-msg, is there a way I can use it where abort still can
work?


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

  Powered by Linux