Merge branch 'jk/pack-objects-reports-num-objects-to-trace2'
authorJunio C Hamano <gitster@pobox.com>
Wed, 8 May 2019 15:37:23 +0000 (00:37 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 May 2019 15:37:23 +0000 (00:37 +0900)
The "git pack-objects" command learned to report the number of
objects it packed via the trace2 mechanism.

* jk/pack-objects-reports-num-objects-to-trace2:
pack-objects: write objects packed to trace2

builtin/pack-objects.c
index 2d9a3bdc9d83e24759b5a8892c26863bd9829c34..d7743f110bce610a20fd7089d8181a8c36f60e80 100644 (file)
@@ -964,6 +964,8 @@ static void write_pack_file(void)
        if (written != nr_result)
                die(_("wrote %"PRIu32" objects while expecting %"PRIu32),
                    written, nr_result);
+       trace2_data_intmax("pack-objects", the_repository,
+                          "write_pack_file/wrote", nr_result);
 }
 
 static int no_try_delta(const char *path)