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 4, 2009, 16:01 UTC
Message-ID
<20090604160152.GA13984@sigill.intra.peff.net>
In-Reply-To
<be6fef0d0906040545j7bd754e0j2c60af833e2ac4a4@mail.gmail.com>
On Thu, Jun 04, 2009 at 08:45:28PM +0800, Tay Ray Chuan wrote:
Show 5 quoted lines
> I have a branch 'http-progress-indicators' at my repo
> git://github.com/rctay/git.git. It contains a patch on walker.c that
> updates the object total as the fetch goes along. The progress
> indicator says "Processing targets:..." for lack of a better name; I'm
> all for suggestions.

Thanks, I took a look at starting on a progress meter yesterday, but I do think it makes sense to integrate with the work you are doing.

I tried your http-progress-indicators branch. A few comments:
  1. You still end up with a lot of lines of output. Some of those are
     "Getting pack $x" which we can probably get rid of in non-verbose
     mode. But we still get a different progress indicator line for each
     fetched item, which can add up to quite a lot. I was thinking of
     something like
        Fetching %s (got %d packs, %d loose): (%d/%d)
     with the substitutions:
       %s = "pack", "index", or "loose object"
       %d packs, %d loose = a running count of how much we've gotten
       %d/%d = current and total byte counts for what we are getting now
     and then you could keep everything on a single line. I don't think
     is possible with the current progress code (it doesn't let you
     restart the counter), but it should be easy with some tweaking.
  2. The current progress code can also do throughput display, which
     would be nice (see display_throughput in progress.[ch]).
  3. Your implementation calls your get_http_file_size, which does a
     separate HEAD request to get the content-length. Instead, do
     a "curl_easy_setopt(slot->curl, CURLOPT_PROGRESSFUNCTION, ...)"
     to set up a progress callback. Curl will call it with the total
     number of bytes (from the content-length header of the actual GET
     request) and the number of bytes currently downloaded.
-Peff
Previous: Tay Ray ChuanNext: Tay Ray Chuan
Message 12 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.