]> git.ipfire.org Git - thirdparty/git.git/commitdiff
pack-revindex.c: instrument loading on-disk reverse index
authorTaylor Blau <me@ttaylorr.com>
Tue, 25 Jan 2022 22:41:05 +0000 (17:41 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 27 Jan 2022 20:07:53 +0000 (12:07 -0800)
In a subsequent commit, we'll use the MIDX's new 'RIDX' chunk as a
source for the reverse index's data. But it will be useful for tests to
be able to determine whether the reverse index was loaded from the
separate .rev file, or from a chunk within the MIDX.

To instrument this, add a trace2 event which the tests can look for in
order to determine the reverse index's source.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Reviewed-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pack-revindex.c

index 70d0fbafcbf954e33b58e6fb79dd173282f59eea..bd15ebad03ec024ac85fa5b856e7b2f694e027c9 100644 (file)
@@ -301,6 +301,9 @@ int load_midx_revindex(struct multi_pack_index *m)
        if (m->revindex_data)
                return 0;
 
+       trace2_data_string("load_midx_revindex", the_repository,
+                          "source", "rev");
+
        get_midx_rev_filename(&revindex_name, m);
 
        ret = load_revindex_from_disk(revindex_name.buf,