Re: [PATCH 1/9] t/helper/test-read-midx.c: add '--show-objects'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/10/21 6:02 PM, Taylor Blau wrote:
> +	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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux