Subject: Re: [PATCH v3 5/5] bitmap: add trace2 outputs during open "bitmap" file

From: Junio C Hamano <[email-masked]>
Date: Mon, 13 Jun 2022 13:59:05 -0700

Teng Long <[email-masked]> writes:

> diff --git a/pack-bitmap.c b/pack-bitmap.c
> index 5654eb7b8d..ced5993560 100644
> --- a/pack-bitmap.c
> +++ b/pack-bitmap.c
> @@ -312,9 +312,11 @@ char *pack_bitmap_filename(struct packed_git *p)
>  static int open_midx_bitmap_1(struct bitmap_index *bitmap_git,
>  			      struct multi_pack_index *midx)
>  {
> +	int fd;
>  	struct stat st;
>  	char *bitmap_name = midx_bitmap_filename(midx);
> -	int fd = git_open(bitmap_name);
> +	trace2_data_string("midx", the_repository, "path", bitmap_name);
> +	fd = git_open(bitmap_name);
>  
>  	free(bitmap_name);

The patch adds new statements at a wrong place.  The block of
declarations and the first statement in the block were separated by
a blank line, but they no longer are.

These things tend to show up in merges quite clearly.  They do not
cause more unnecessary conflicts but can make resolution more error
prone.

Thanks.