Re: [PATCH] commit & merge: modularize the empty message validator

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

 



Kaartic Sivaraam <kaarticsivaraam91196@xxxxxxxxx> writes:

> I have a few doubts for which I need clarification to move on with
> this.
>
>     1. If we abort when the <message> part is empty wouldn't it be too
>     restrictive ?
>
>     IOW, Wouldn't it affect users of "git commit -‍-cleanup=verbatim"
>     who wish to commit only the comments or parts of it ?
>     (I'm not sure if someone would find that useful)
>
>     2. Is it ok to use the "find_trailer_start" function of "trailer.c"
>     to locate the trailer? 
>
>     Note: It has a little issue that it wouldn't detect the trailer if
>     the message comprises of one trailer alone and no other text. This
>     case occurs while aborting a commit started using "git commit -s".
>     Any possibilities to overcome the issue?
>
>     3. Ignoring point 1 for now, What other helper methods except the
>     ones listed below could be helpful in the separating the cleaned up
>     commit message into the <message>, <trailer>, <junk-at-tail> ?
>
>         * ignore_non_trailer
>         * find_trailer_start

All good points; if it bothers you that "commit" and "merge" define
"emptyness" of the buffer differently too much, I think you could
persuade me to unify them to "the buffer _must_ contain no bytes",
i.e. not special-casing sign-off lines only "commit".

It would be a backward incompatible tightening of the established
rule, but it may not be a bad change.



[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