Subject: Re: [PATCH v2 06/23] pack-bitmap-write: support storing pseudo-merge commits

From: Patrick Steinhardt <[email-masked]>
Date: Mon, 6 May 2024 13:52:56 +0200

On Mon, Apr 29, 2024 at 04:43:15PM -0400, Taylor Blau wrote:
[snip]
> @@ -46,6 +48,11 @@ struct bitmap_writer {
>  
>  static struct bitmap_writer writer;
>  
> +static inline int bitmap_writer_selected_nr(void)
> +{
> +	return writer.selected_nr - writer.pseudo_merges_nr;
> +}

This function may use a comment to explain what its meaning actually is.
Like, `bitmap_writer_selected_nr()` is obviously not the same as the
`selected_nr` of the `bitmap_writer`, which is quite confusing. So why
do we subtract values and why are there two different `selected_nr`s?

[snip]
> diff --git a/pack-bitmap.h b/pack-bitmap.h
> index dae2d68a338..ca9acd2f735 100644
> --- a/pack-bitmap.h
> +++ b/pack-bitmap.h
> @@ -21,6 +21,7 @@ struct bitmap_disk_header {
>  	unsigned char checksum[GIT_MAX_RAWSZ];
>  };
>  
> +#define BITMAP_PSEUDO_MERGE (1u<<21)
>  #define NEEDS_BITMAP (1u<<22)

This flag is already used by "builtin/pack-objects.c", which may be fine.
But in any case, shouldn't we update "object.h" with both of these flags?

Patrick