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

Re: [Patch] Prevent cloning over http from spewing

From
Jeff King <peff@peff.net>
Date
Jun 3, 2009, 19:10 UTC
Message-ID
<20090603191050.GB29564@coredump.intra.peff.net>
In-Reply-To
<7vmy8p8947.fsf@alter.siamese.dyndns.org>
On Wed, Jun 03, 2009 at 11:28:40AM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> You _could_ do something like this patch.  Instead of showing "walk %s"
> and "got %s" lines, with occasional "Getting pack %s\n which contains %s",
> it shows and recycles a single line that shows the number of packs, walk
> actions and got actions.
> 
> This is a toy patch; it hiccups for too long while getting each pack, and
> it does not cleanly restore the display after it finishes, but I'll leave
> it to interested readers as an exercise to properly do this using the
> progress API.

This is much better, and I had roughly the same thought when I saw the original "stop http from spewing" patch. The output is confusing, but we need _some_ progress indicator.

Unfortunately, I don't think it's possible to give a "percent complete" because we are fetching as we walk, meaning we don't know where the end is until we get there (but I might be wrong, as I have never looked too closely at the http fetch code).

So I think the best we could do is probably:
  1. summarize what we have fetched (N packs, N loose objects)
  2. show what we are currently fetching (object or pack)
  3. show the number of bytes retrieved for the current item
  4. if the server provides content-length, show the percentage
     completed for this object
  5. show the current throughput

That should give the user some eye candy to show something is happening, and for a mostly packed repo, should come close to being an overall progress indicator (since most of the time will be spent on one big pack, that will be most of what the user sees, and its progress indicator will dominate the overall time).

I suspect items 3-5 could mostly re-use the existing progress code, too.
-Peff
Previous: Junio C HamanoNext: Shawn O. Pearce
Message 5 of 23 in “Prevent cloning over http from spewing”
  1. Prevent cloning over http from spewingsparse@infidigm.net, Jun 2, 2009
  2. Erik Faye-LundJun 3, 2009
  3. Jakub NarebskiJun 3, 2009
  4. Junio C HamanoJun 3, 2009
  5. Jeff KingJun 3, 2009
  6. Shawn O. PearceJun 3, 2009
  7. Jeff KingJun 3, 2009
  8. Shawn O. PearceJun 3, 2009
  9. Jeff KingJun 3, 2009
  10. Shawn O. PearceJun 3, 2009
  11. Tay Ray ChuanJun 4, 2009
  12. Jeff KingJun 4, 2009
  13. Tay Ray ChuanJun 7, 2009
  14. Tay Ray ChuanJun 7, 2009
  15. Jeff KingJun 8, 2009
  16. Tay Ray ChuanJun 10, 2009
  17. Tay Ray ChuanJun 10, 2009
  18. Jeff KingJun 11, 2009
  19. Tay Ray ChuanJun 22, 2009
  20. Tay Ray ChuanJul 20, 2009
  21. Jeff KingJun 8, 2009
  22. Tay Ray ChuanJun 7, 2009
  23. Jakub NarebskiJun 5, 2009

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.