git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v5] format-patch --signature-file <file>

From
Junio C Hamano <gitster@pobox.com>
Date
May 21, 2014, 18:26 UTC
Message-ID
<xmqqsio3ounp.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140521175930.GA4588@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 21 quoted lines
> On Wed, May 21, 2014 at 10:37:05AM -0700, Junio C Hamano wrote:
>
>> > 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...
>
> I didn't think of mine as cleansing. It is more like "do not duplicate a
> newline ourselves if there is already one there".  But I guess those are
> two sides of the same coin.

Yeah, I agree with the last sentence. My mention of "cleansing" took into account your "do we want to omit the leading blank as well?" as well. In any case, wouldn't reusing stripspace() make the fix-up shorter?

Previous: Jeff KingNext: Jeff King
Message 12 of 15 in “format-patch --signature-file <file>”
  1. format-patch --signature-file <file>Jeremiah Mahler, May 20, 2014
  2. format-patch --signature-file <file>Jeremiah Mahler, May 20, 2014
  3. Jeff KingMay 20, 2014
  4. Junio C HamanoMay 20, 2014
  5. Jeff KingMay 20, 2014
  6. Junio C HamanoMay 20, 2014
  7. Jeff KingMay 21, 2014
  8. Jeremiah MahlerMay 21, 2014
  9. Jeff KingMay 21, 2014
  10. Junio C HamanoMay 21, 2014
  11. Jeff KingMay 21, 2014
  12. Junio C HamanoMay 21, 2014
  13. Jeff KingMay 21, 2014
  14. Jeremiah MahlerMay 21, 2014
  15. Jeremiah MahlerMay 21, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.