Jeff King <> writes:

> On Tue, May 20, 2014 at 11:46:51AM -0700, Junio C Hamano wrote:
>> Jeff King <> writes:
>> > If it were just "--signature", I'd agree. After all, nobody is even
>> > complaining. But this is also in preparation for --signature-file.
>> > Should the user create a file without a trailing newline?
>> Ahh, I missed that part.
>> I am fine with processing it with stripspace().
> I wasn't planning on anything as drastic as stripspace. I really just
> wanted to suppress the one newline, which is almost certainly the right
> thing to include for "--signature", but the wrong thing for
> "--signature-file" (i.e., the patch I posted earlier).
> ...
> I dunno. Maybe it is not worth caring too much about.

I suggested stripspace() because I know we do not care too
much, actually.

Cleansing blank lines in one way for many types of user input
(e.g. commit log messages and tag messages) while doing it in a
completely different way just for "--signature-file" is warranted if
there is a good reason for them to be different, but I did not think
of any, and I still don't.  So...

>> By the way, at some point we may want to move that helper function
>> to strbuf.c, but that is a separate issue.
> Agreed. I was touching some string functions earlier today and noticed
> that strbuf.c actually contains a lot of non-strbuf functions for
> dealing with C strings. That's fine, I guess, but I also wondered if we
> should have a separate file for C-string functions. I suppose it doesn't
> matter that much either way, as long as it's in a libgit.a file (and
> stripspace currently is _not_, which I assume is what you were
> indicating above).

Yes, I thought you would have used it in your follow-up patch if it
were more prominent.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to