Re: [PATCH 1/4] t/helper/test-bitmap.c: add 'dump-hashes' mode

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

 



On Wed, Sep 08, 2021 at 03:37:05AM +0200, Ævar Arnfjörð Bjarmason wrote:
> > +static int bitmap_dump_hashes(void)
> > +{
> > +	return test_bitmap_hashes(the_repository);
> > +}
> > [...]
> >  		return bitmap_list_commits();
> > +	if (!strcmp(argv[1], "dump-hashes"))
> > +		return bitmap_dump_hashes();
>
> Perhaps the return code only for the brevity of this test-only code?
> Seems like having bitmap_dump_hashes() do the "return 0" would be better
> in that case.

Yeah, it is silly to just return a constant from bitmap_dump_hashes
(and ditto for bitmap_list_commits), but it makes this easier to write.

I don't care either way. If you feel strongly, then please say so (but I
can't imagine that you do).

Thanks,
Taylor



[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