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

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

From
Jeff King <peff@peff.net>
Date
May 21, 2014, 16:42 UTC
Message-ID
<20140521164255.GA2040@sigill.intra.peff.net>
In-Reply-To
<xmqq7g5gz3s4.fsf@gitster.dls.corp.google.com>
On Tue, May 20, 2014 at 11:46:51AM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> Jeff King <peff@peff.net> 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).

Stripspace() would drop all extra whitespace, and I wondered if people would _want_ it in their sigs (e.g., a blank line after the "-- " but before their .sig content).

I dunno. Maybe it is not worth caring too much about. I don't want to hold up Jeremiah's patch for something that I suspect neither of us cares _that_ much about (I know I am not planning on using --signature-file myself). I just don't want to deal with a patch later that says "oh, this spacing is wrong" and have to respond "yes, but we have to retain it so as not to break existing users".

> 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).

-Peff
Previous: Junio C HamanoNext: Jeremiah Mahler
Message 7 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.