Subject: Re: [PATCH 1/7] pack-objects: pass --objects with --path-walk

From: Junio C Hamano <[email-masked]>
Date: Mon, 04 May 2026 09:49:47 +0900

"Derrick Stolee via GitGitGadget" <[email-masked]> writes:

> From: Derrick Stolee <[email-masked]>
>
> When 'git pack-objects' has the --path-walk option enabled, it uses a
> different set of revision walk parameters than normal. For once,

"once" -> "one" (or "instance")?

> --objects was previously assumed by the path-walk API and was not needed
> to be added. We also needed --boundary to allow discovering
> UNINTERESTING objects to use as delta bases.
>
> We will be updating the path-walk API soon to work with some filter
> options. However, the revision machinery will trigger a fatal error:
>
>   fatal: object filtering requires --objects
>
> The fix is easy: add the --objects option as an argument. This has no
> effect on the path-walk API but does simplify the revision option
> parsing for the objects filter.
>
> We can remove the comment about "removing" the options because they were
> never removed and instead not added. We still need to disable using
> bitmaps.

In the old code, there was a valid reason why bitmaps were not used
(i.e., "--objects" not enabled), but that no longer holds (i.e., now
we add "--objects" ourselves).  Do we need to give an updated
rationale to keep bitmap disabled?

> Signed-off-by: Derrick Stolee <[email-masked]>
> ---
>  builtin/pack-objects.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
> index dd2480a73d..4338962904 100644
> --- a/builtin/pack-objects.c
> +++ b/builtin/pack-objects.c
> @@ -5190,10 +5190,7 @@ int cmd_pack_objects(int argc,
>  	}
>  	if (path_walk) {
>  		strvec_push(&rp, "--boundary");
> -		 /*
> -		  * We must disable the bitmaps because we are removing
> -		  * the --objects / --objects-edge[-aggressive] options.
> -		  */
> +		strvec_push(&rp, "--objects");
>  		use_bitmap_index = 0;
>  	} else if (thin) {
>  		use_internal_rev_list = 1;