Re: [PATCH 1/9] t/helper/test-read-midx.c: add '--show-objects'
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Feb 11, 2021, 02:27 UTC
- Message-ID
- <7b422082-d6a9-5e64-17a0-559da7777a08@gmail.com>
- In-Reply-To
- <e36acb005d3563db772711207d2af3df03685bd4.1612998106.git.me@ttaylorr.com>
On 2/10/21 6:02 PM, Taylor Blau wrote:
Show 17 quoted lines
> + if (show_objects) {
> + struct object_id oid;
> + struct pack_entry e;
> +
> + for (i = 0; i < m->num_objects; i++) {
> + nth_midxed_object_oid(&oid, m, i);
> + fill_midx_entry(the_repository, &oid, &e, m);
> +
> + printf("%s %"PRIu64"\t%s\n",
> + oid_to_hex(&oid), e.offset, e.p->pack_name);
> + }
> + return 0;
> + }
> +
> printf("header: %08x %d %d %d %d\n",
> m->signature,
> m->version,It seems a little odd to me that the list of objects happens after the header information. Probably doesn't matter in your test cases, but I sometimes use the test helpers to diagnose data during development and could see piping this output into 'less' and wanting the header at the top.
Thanks, -Stolee