Re: [PATCH] builtin/show-ref.c: avoid over-iterating with --heads, --tags

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

 



Derrick Stolee <derrickstolee@xxxxxxxxxx> writes:

>> -	for_each_ref(show_ref, NULL);
>> +	if (heads_only || tags_only) {
>> +		if (heads_only)
>> +			for_each_fullref_in("refs/heads/", show_ref, NULL);
>> +		if (tags_only)
>> +			for_each_fullref_in("refs/tags/", show_ref, NULL);
>
> This looks a little silly if these were truly "only" (they
> could not both be true), but indeed they could both be true
> and the names are just slightly misleading.
>
> Indeed, t1403-show-ref.sh tests all combinations of these
> options.

Hmph, that is right. show-heads and show-tags, perhaps.

Thanks, both.  Queued.



[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