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

Re: [PATCH 0/4] Expose gpgsig in pretty-print

From
Jeff King <peff@peff.net>
Date
Dec 17, 2018, 20:24 UTC
Message-ID
<20181217202406.GA12122@sigill.intra.peff.net>
In-Reply-To
<CAJdN7KjExd6T+H4-wEupO2dg_mMWzeA22oYaskkfhz+GuFbfRQ@mail.gmail.com>
On Fri, Dec 14, 2018 at 11:07:03AM -0500, John Passaro wrote:
Show 5 quoted lines
> Then I might rename the other new placeholders too:
> 
> %Gs: signed commit signature (blank when unsigned)
> %Gp: signed commit payload (i.e. in practice minus the gpgsig header;
> also blank when unsigned as well)

One complication: the pretty-printing code sees the commit data in the i18n.logOutputEncoding charset (utf8 by default). But the signature will be over the raw commit data. That's also utf8 by default, but there may be an encoding header indicating that it's something else. In that case, you couldn't actually verify the signature from the "%Gs%Gp" pair.

I don't think that's insurmountable in the code. You'll have to jump through a few hoops to make sure you have the _original_ payload, but we obviously do have that data. However, it does feel a little weird to include content from a different encoding in the middle of the log output stream which claims to be i18n.logOutputEncoding.

-Peff
Previous: John PassaroNext: John Passaro
Message 11 of 14 in “Expose gpgsig in pretty-print”
  1. 0/4 Expose gpgsig in pretty-printJohn Passaro, Dec 13, 2018
  2. 1/4 pretty: expose raw commit signatureJohn Passaro, Dec 13, 2018
  3. 2/4 t/t7510-signed-commit.sh: test new placeholdersJohn Passaro, Dec 13, 2018
  4. 3/4 doc, tests: pretty behavior when gpg missingJohn Passaro, Dec 13, 2018
  5. 4/4 docs/pretty-formats: add explanation + copy editsJohn Passaro, Dec 13, 2018
  6. Michał GórnyDec 14, 2018
  7. John PassaroDec 14, 2018
  8. Michał GórnyDec 14, 2018
  9. John PassaroDec 14, 2018
  10. John PassaroDec 14, 2018
  11. Jeff KingDec 17, 2018
  12. John PassaroDec 19, 2018
  13. Michał GórnyDec 21, 2018
  14. Junio C HamanoDec 15, 2018

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.