From: Junio C Hamano Date: Thu, 13 Jul 2017 19:23:45 GMT Subject: Re: [PATCH] commit & merge: modularize the empty message validator Message-ID: In-Reply-To: <1499969722.5973.2.camel@gmail.com> Kaartic Sivaraam writes: > I have a few doubts for which I need clarification to move on with > this. > > 1. If we abort when the 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 , , ? > > * 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.