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

Re: [PATCH] ref-filter: share bases and is_base_tips between formatting and sorting

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 16, 2025, 17:31 UTC
Message-ID
<xmqqr052sm16.fsf@gitster.g>
In-Reply-To
<20250116102154.GA724126@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 22 quoted lines
> On Thu, Jan 16, 2025 at 05:06:37AM -0500, Jeff King wrote:
>
>> On Thu, Jan 16, 2025 at 04:51:28AM -0500, Jeff King wrote:
>> 
>> > Yet another option in the near term might be storing these ahead-behind
>> > bits in the individual atoms. Since the point is to do a single
>> > traversal, we'd have to marshal them into a unified data structure at
>> > some point. But we already do that! In filter_ahead_behind() we convert
>> > the string list into an array (and ironically do not even look at the
>> > strings, only their "util" fields).
>> > 
>> > So something like this (only lightly tested) seems to work:
>> 
>> I compiled it without DEVELOPER=1, so I missed a few unused parameters.
>> We'd want this on top:
>
> And one final thought on this approach: if we do want to do it, perhaps
> it would make sense to build on top of the patch you sent. I think yours
> fixes the bug in a more direct and obvious way, and then my approach
> would merely be internal reorganization on top.
>
> At any rate, here is the is_base conversion for posterity.
Looking good.  Thanks.
Previous: Jeff KingNext: René Scharfe
Message 10 of 19 in “Bug sorting git branch output by ahead-behind:HEAD”
  1. Ross GoldbergJan 5, 2025
  2. ref-filter: share bases and is_base_tips between formatting and sortingRené Scharfe, Jan 12, 2025
  3. Jeff KingJan 13, 2025
  4. Jeff KingJan 13, 2025
  5. Junio C HamanoJan 13, 2025
  6. René ScharfeJan 14, 2025
  7. Jeff KingJan 16, 2025
  8. Jeff KingJan 16, 2025
  9. Jeff KingJan 16, 2025
  10. Junio C HamanoJan 16, 2025
  11. René ScharfeJan 18, 2025
  12. René ScharfeJan 19, 2025
  13. René ScharfeJan 19, 2025
  14. René ScharfeJan 19, 2025
  15. Jeff KingJan 19, 2025
  16. René ScharfeJan 18, 2025
  17. 1/3 ref-filter: move ahead-behind bases into used_atomRené Scharfe, Jan 18, 2025
  18. 3/3 ref-filter: remove ref_format_clear()René Scharfe, Jan 18, 2025
  19. 2/3 ref-filter: move is-base tip to used_atomRené Scharfe, Jan 18, 2025

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.