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

Re: [PATCH 3/3] transport: allow summary-width to be computed dynamically

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 22, 2016, 16:25 UTC
Message-ID
<xmqq4m449wqw.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20161022050426.t2fifjqrldc6mebc@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 14 quoted lines
> On Fri, Oct 21, 2016 at 09:39:45PM -0700, Junio C Hamano wrote:
>
>> And this is the final one.
>> 
>> -- >8 --
>> From: Junio C Hamano <gitster@pobox.com>
>> Date: Fri, 21 Oct 2016 21:33:06 -0700
>> Subject: [PATCH] transport: compute summary-width dynamically
>> 
>> Now all that is left to do is to actually iterate over the refs
>> and measure the display width needed to show their abbreviation.
>
> I think we crossed emails. :) This is obviously correct, if we don't
> mind paying the find_unique_abbrev cost twice for each sha1.

Indeed we did. I do not think the cost matters that much in the codepath to produce the final summary output.

> This is a minor style nit, but I think it's better to avoid mixing
> unrelated bits between the initialization, condition, and iteration bits
> of a for loop.
Yeah, you're right.
Previous: Jeff King
Message 14 of 14 in “[BUG] fetch output is ugly in 'next'”
  1. Jeff KingOct 21, 2016
  2. Duy NguyenOct 21, 2016
  3. Duy NguyenOct 21, 2016
  4. Junio C HamanoOct 21, 2016
  5. Jeff KingOct 21, 2016
  6. Junio C HamanoOct 21, 2016
  7. 0/3 fetch output is ugly in 'next'Junio C Hamano, Oct 21, 2016
  8. 2/3 fetch: pass summary_width down the callchainJunio C Hamano, Oct 21, 2016
  9. 1/3 transport: pass summary_width down the callchainJunio C Hamano, Oct 21, 2016
  10. 3/3 transport: allow summary-width to be computed dynamicallyJunio C Hamano, Oct 21, 2016
  11. Jeff KingOct 22, 2016
  12. Junio C HamanoOct 22, 2016
  13. Jeff KingOct 22, 2016
  14. Junio C HamanoOct 22, 2016

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.