Re: [PATCH v4] add --summary option to git-push and git-fetch

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

>>> How would you know, when you asked 20 and you showed 20 here, that there
>>> is no more to come?
>>
>> If there's more it will print the "...", if there isn't then it won't.
>
> If your limit is 20 and if you unconditionally say "..." after pulling 20
> from the pool, the consumer of your output would think "Ah, I see 20 but
> that is only I asked for 20, and the ... means there are more".  But that
> is incorrect because your 21st call to get_revision() might have yielded
> NULL in which case you had only 20 after all.
>
> You cannot do "..." correctly without pulling one more than the limit from
> the pool.

Ah, I either misremembered the loop or didn't read it correctly.

Either way, the loop in your v5 looks correct ("read, check count to say
... and exit if limit goes down to zero, show one, decrement and go to
top").
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]