[Top][All Lists]

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

Re: commit-msg hook

From: Paul Eggert
Subject: Re: commit-msg hook
Date: Fri, 10 Apr 2015 19:42:53 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Eli Zaretskii wrote:
On MS-Windows, this hook fails commits with valid UTF-8 characters in
the log messages, probably because the version of Gawk I have here is
too old (3.0.4; that's what MSYS comes with).

Ouch. That's old. Why is MSYS still using a circa-1999 gawk? Can we talk the MSYS folks into having something more up-to-date?

The mawk 1.3.3 replacement regexp for non_print does work, so I
suggest to have a Gawk version check in the script

It's better to check for features rather than versions. I got a copy of Gawk 3.0.4 out of mothballs and hacked for a while until I got something that worked for me.

Btw, when the hook is run by Git, the "; see 'CONTRIBUTE'" part of the
message is not shown; could it be that the semi-colon gets interpreted
by the shell, or something like that?  (My Git version is 1.9.5.)

Most likely you've got an obsolete hook. Please try "git pull" followed by "./autogen.sh".

I would also suggest to say explicitly in the message that the commit
was aborted, because it is not at all clear

Thanks, good suggestion.

Johan Bockgård wrote:
> Also, the hook should ignore the stuff after
>      # ------------------------ >8 ------------------------
>      # Do not touch the line above.
>      # Everything below will be removed.
> when running the checks on the commit message. (Inserted by commit -v.)

Thanks, I had forgotten about commit -v.

I installed some patches to try to fix the above problems (assuming my guess is right about the obsolete hook). You can do an "./autogen.sh" after pulling these patches.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]