git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "René Scharfe" <l.s.r@web.de>,
	"Ross Goldberg" <ross.goldberg@gmail.com>,
	git@vger.kernel.org, "Derrick Stolee" <stolee@gmail.com>
Subject: Re: [PATCH] ref-filter: share bases and is_base_tips between formatting and sorting
Date: Thu, 16 Jan 2025 09:31:33 -0800	[thread overview]
Message-ID: <xmqqr052sm16.fsf@gitster.g> (raw)
In-Reply-To: <20250116102154.GA724126@coredump.intra.peff.net> (Jeff King's message of "Thu, 16 Jan 2025 05:21:54 -0500")

Jeff King <peff@peff.net> writes:

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

  reply	other threads:[~2025-01-16 17:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-05  9:48 Bug sorting git branch output by ahead-behind:HEAD Ross Goldberg
2025-01-12 10:01 ` [PATCH] ref-filter: share bases and is_base_tips between formatting and sorting René Scharfe
2025-01-13  5:17   ` Jeff King
2025-01-13  5:23     ` Jeff King
2025-01-13 17:25     ` Junio C Hamano
2025-01-14 18:55     ` René Scharfe
2025-01-16  9:51       ` Jeff King
2025-01-16 10:06         ` Jeff King
2025-01-16 10:21           ` Jeff King
2025-01-16 17:31             ` Junio C Hamano [this message]
2025-01-18 17:11             ` René Scharfe
2025-01-19  9:11               ` René Scharfe
2025-01-19  9:11               ` René Scharfe
2025-01-19  9:26               ` René Scharfe
2025-01-19 12:40                 ` Jeff King
2025-01-18 17:11         ` René Scharfe
2025-01-18 17:11   ` [PATCH v2 1/3] ref-filter: move ahead-behind bases into used_atom René Scharfe
2025-01-18 17:11   ` [PATCH v2 2/3] ref-filter: move is-base tip to used_atom René Scharfe
2025-01-18 17:11   ` [PATCH v2 3/3] ref-filter: remove ref_format_clear() René Scharfe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqr052sm16.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    --cc=peff@peff.net \
    --cc=ross.goldberg@gmail.com \
    --cc=stolee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).