Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Derrick Stolee <derrickstolee@github.com>
Subject: Re: [PATCH v2] builtin/pack-objects.c: introduce `pack.extraCruftTips`
Date: Fri, 5 May 2023 20:20:22 -0400	[thread overview]
Message-ID: <ZFWdRoUOQJfP3db+@nand.local> (raw)
In-Reply-To: <ZFWbuf34pVxJyRiM@nand.local>

On Fri, May 05, 2023 at 08:13:45PM -0400, Taylor Blau wrote:
> On Fri, May 05, 2023 at 06:13:57PM -0400, Jeff King wrote:
> > One thing that could make this a lot simpler is if the code was added to
> > "are we recent" code paths in the first place.
> >
> > Something like this:
>
> This is quite nice, and I think that it's a good direction to push this
> ~series~ patch in before queuing. That said, I wasn't sure about...
>
> > @@ -78,7 +144,7 @@ static void add_recent_object(const struct object_id *oid,
> >  	struct object *obj;
> >  	enum object_type type;
> >
> > -	if (mtime <= data->timestamp)
> > +	if (!obj_is_recent(oid, mtime, data))
> >  		return;
> >
> >  	/*
>
> ...this hunk. That only kicks in if you have other recent object(s),
> since the hooks are consulted as a side-effect of calling your new
> `obj_is_recent()` function.
>
> I think in most cases that's fine, but if you had no otherwise-recent
> objects around, then this code wouldn't kick in in the first place.
>
> I wonder if it might make more sense to call the hooks directly in
> add_unseen_recent_objects_to_traversal().

OK, no, this is fine, but we'd need to make sure that
want_recent_object() also understood the fake recent set here, since
add_recent_loose() and add_recent_packed() both bail early when
want_recent_object() returns 0.

Thanks,
Taylor

  reply	other threads:[~2023-05-06  0:20 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 17:27 [PATCH] builtin/pack-objects.c: introduce `pack.extraCruftTips` Taylor Blau
2023-04-20 18:12 ` Junio C Hamano
2023-04-20 19:30   ` Taylor Blau
2023-04-20 19:52     ` Junio C Hamano
2023-04-20 20:48       ` Taylor Blau
2023-04-21  0:10 ` Chris Torek
2023-04-21  2:14   ` Taylor Blau
2023-04-25 19:42 ` Derrick Stolee
2023-04-25 21:25   ` Taylor Blau
2023-04-26 10:52     ` Derrick Stolee
2023-05-03  0:06       ` Taylor Blau
2023-05-03  0:09 ` [PATCH v2] " Taylor Blau
2023-05-03 14:01   ` Derrick Stolee
2023-05-03 19:59   ` Jeff King
2023-05-03 21:22     ` Taylor Blau
2023-05-05 21:23       ` Jeff King
2023-05-06  0:06         ` Taylor Blau
2023-05-06  0:14           ` Taylor Blau
2023-05-03 21:28     ` Taylor Blau
2023-05-05 21:26       ` Jeff King
2023-05-05 22:13         ` Jeff King
2023-05-06  0:13           ` Taylor Blau
2023-05-06  0:20             ` Taylor Blau [this message]
2023-05-06  2:12             ` Jeff King
2023-05-03 22:05 ` [PATCH v3] " Taylor Blau
2023-05-03 23:18   ` Junio C Hamano
2023-05-03 23:42     ` Junio C Hamano
2023-05-03 23:48       ` Taylor Blau
2023-05-03 23:50       ` Taylor Blau
2023-05-05 21:39     ` Jeff King
2023-05-05 22:19   ` 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=ZFWdRoUOQJfP3db+@nand.local \
    --to=me@ttaylorr.com \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 read-only IMAP folder(s) and NNTP newsgroup(s).