Re: [PATCH v1 3/3] bitmap: add trace outputs during open "bitmap" file
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 24, 2022, 18:42 UTC
- Message-ID
- <xmqqy20zgpkq.fsf@gitster.g>
- In-Reply-To
- <9912450fc11f869ad1b6409d7adcfe20f06c17ff.1648119652.git.dyroneteng@gmail.com>
Teng Long <dyroneteng@gmail.com> writes:
> It's supported for a Git repo to use bitmap in both normal bitmap way > or a multi-pack-index bitmap.
This step out of 3 patches does match what was sold on the cover letter, and it does not seem to even need the other two.
Show 16 quoted lines
> Signed-off-by: Teng Long <dyroneteng@gmail.com>
> ---
> midx.c | 2 ++
> pack-bitmap.c | 4 ++++
> 2 files changed, 6 insertions(+)
>
> diff --git a/midx.c b/midx.c
> index 865170bad0..fda9644028 100644
> --- a/midx.c
> +++ b/midx.c
> @@ -392,6 +392,8 @@ int prepare_multi_pack_index_one(struct repository *r, const char *object_dir, i
> struct multi_pack_index *m_search;
>
> prepare_repo_settings(r);
> + trace2_data_string("midx", r, "core.multipackIndex",
> + r->settings.core_multi_pack_index ? "true" : "false");That's an overly deep contination line.
Show 13 quoted lines
> if (!r->settings.core_multi_pack_index)
> return 0;
>
> diff --git a/pack-bitmap.c b/pack-bitmap.c
> index b1357137bf..14cf8abebd 100644
> --- a/pack-bitmap.c
> +++ b/pack-bitmap.c
> @@ -490,6 +490,8 @@ static int open_pack_bitmap(struct repository *r,
> }
> }
>
> + trace2_data_string("bitmap", the_repository, "open bitmap (non-midx)",
> + ret ? "failed" : "ok");Likewise.
Show 9 quoted lines
> return ret;
> }
>
> @@ -507,6 +509,8 @@ static int open_midx_bitmap(struct repository *r,
> break;
> }
> }
> + trace2_data_string("midx", the_repository, "open bitmap (midx)",
> + ret ? "failed" : "ok");Likewise.
> return ret; > }