From: Taylor Blau <me@ttaylorr.com>
To: Jeff King <peff@peff.net>
Cc: Taylor Blau <me@ttaylorr.com>, Jacob Vosmaer <jacob@gitlab.com>,
git@vger.kernel.org
Subject: Re: [PATCH 1/1] builtin/pack-objects.c: avoid iterating all refs
Date: Tue, 19 Jan 2021 18:54:09 -0500 [thread overview]
Message-ID: <YAdxIfjkK+ShZ3Ux@nand.local> (raw)
In-Reply-To: <YAdsTjDXImYlfTn8@coredump.intra.peff.net>
On Tue, Jan 19, 2021 at 06:33:34PM -0500, Jeff King wrote:
> On Tue, Jan 19, 2021 at 06:08:31PM -0500, Taylor Blau wrote:
> > That said, you could shorten this to use 'for_each_tag_ref()' instead
> > (which compiles to the exact same thing).
>
> You'd end up with "v1.2.3" in the refname field of the callback then,
> rather than "refs/tags/v1.2.3". So we'd definitely need to drop the
> prefix check in add_ref_tag() then (though I think it is a good idea
> anyway). But I'm also not sure if it would interfere with peel_ref(),
> and its magic for using packed-refs peeled information.
Ack, thanks for correcting me. Looking at ref_peel_ref(), I am almost
positive that calling peel_ref() on "v1.2.3" (referring to
"refs/tags/v1.2.3") wouldn't work. So I think the current implementation
is good.
Thanks,
Taylor
next prev parent reply other threads:[~2021-01-19 23:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 14:33 [PATCH 0/1] builtin/pack-objects.c: avoid iterating all refs Jacob Vosmaer
2021-01-19 14:33 ` [PATCH 1/1] " Jacob Vosmaer
2021-01-19 23:08 ` Taylor Blau
2021-01-19 23:33 ` Jeff King
2021-01-19 23:54 ` Taylor Blau [this message]
2021-01-19 23:15 ` Jeff King
2021-01-20 8:50 ` Ævar Arnfjörð Bjarmason
2021-01-20 15:02 ` Taylor Blau
2021-01-20 16:32 ` Ævar Arnfjörð Bjarmason
2021-01-20 19:53 ` Jeff King
2021-01-21 10:26 ` Ævar Arnfjörð Bjarmason
2021-01-21 15:34 ` Jeff King
2021-01-19 23:26 ` [PATCH 0/1] " Jeff King
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=YAdxIfjkK+ShZ3Ux@nand.local \
--to=me@ttaylorr.com \
--cc=git@vger.kernel.org \
--cc=jacob@gitlab.com \
--cc=peff@peff.net \
/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).