git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 30, 2010, 01:25 UTC
Message-ID
<7vwrz08juy.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vzl3w9yst.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
>>> 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").

Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 23 in “add --summary option to git-push and git-fetch”
  1. add --summary option to git-push and git-fetchLarry D'Anna, Jul 3, 2009
  2. Junio C HamanoJul 3, 2009
  3. add --summary option to git-push and git-fetchLarry D'Anna, Jul 7, 2009
  4. Larry D'AnnaJul 9, 2009
  5. add --summary option to git-push and git-fetchLarry D'Anna, Jul 10, 2009
  6. Stephen BoydJul 10, 2009
  7. add --summary option to git-push and git-fetchLarry D'Anna, Jul 11, 2009
  8. Junio C HamanoJul 11, 2009
  9. Larry D'AnnaJan 30, 2010
  10. Junio C HamanoJan 30, 2010
  11. Junio C HamanoJan 30, 2010
  12. Junio C HamanoJan 30, 2010
  13. add --summary option to git-push and git-fetchLarry D'Anna, Jan 30, 2010
  14. add --summary option to git-push and git-fetchLarry D'Anna, Jan 30, 2010
  15. Tay Ray ChuanJan 31, 2010
  16. Ilari LiusvaaraJan 30, 2010
  17. Junio C HamanoJan 30, 2010
  18. Ilari LiusvaaraJan 30, 2010
  19. Daniel BarkalowFeb 1, 2010
  20. Larry D'AnnaFeb 1, 2010
  21. Larry D'AnnaFeb 4, 2010
  22. Junio C HamanoFeb 4, 2010
  23. Junio C HamanoFeb 4, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.