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

Re: [RFC PATCH] git log: support "auto" decorations

From
Junio C Hamano <gitster@pobox.com>
Date
May 30, 2014, 16:55 UTC
Message-ID
<xmqqvbsn9pfx.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140530065737.GA13591@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
> On Thu, May 29, 2014 at 09:54:10PM -0700, Linus Torvalds wrote:
>
>> That said, part of it is just that show-signature is so suboptimal
>> performance-wise, re-parsing the commit buffer for each commit when
>> "show_signature" is set. That's just crazy, we've already parsed the
>> commit text, we already *could* know if it has a signature or not, and
>> skip it if it doesn't. That would require one of the flag bits in the
>> object, though, or something, so it's probably not worth doing.
>
> Wow, it's really quite bad. Not only do we spend time on commits that we
> could otherwise know do not have signatures, but we actually pull the
> buffer from disk, even though we generally have it saved as
> commit->buffer.

The one for the signature on the commit itself is me being lazy and defensive; I did not want to have to worry about people mucking with what is in commit->buffer for whatever reason (e.g. re-encode in different charset, etc.) and then asking the signature validated.

The other one for the merge-tag is me just being lazy, as it is unlikely to be corrupt by any reasonable kinds of mucking with commit->buffer on a merge.

Previous: Jeff KingNext: Jeff King
Message 5 of 13 in “git log: support "auto" decorations”
  1. git log: support "auto" decorationsLinus Torvalds, May 29, 2014
  2. Jeff KingMay 30, 2014
  3. Linus TorvaldsMay 30, 2014
  4. Jeff KingMay 30, 2014
  5. Junio C HamanoMay 30, 2014
  6. Jeff KingMay 30, 2014
  7. Junio C HamanoMay 30, 2014
  8. Jeff KingMay 30, 2014
  9. Jeff KingMay 30, 2014
  10. Junio C HamanoMay 30, 2014
  11. Jeff KingMay 30, 2014
  12. Junio C HamanoMay 30, 2014
  13. Junio C HamanoMay 30, 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.