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

Re: [PATCH 1/2] format-patch: have progress option while generating patches

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 1, 2017, 04:10 UTC
Message-ID
<xmqqpoeo73g7.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170531220100.t27w3w642sn33h7s@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> As I said above, I think I'd prefer it to require "--progress", as
> format-patch is quite often used as plumbing.
Yes, that sounds sensible.

Initially, my reaction was "Why do we even need --progress for format-patch, when it gives one-line per patch output to show the progress anyway?", but if that output is redirected to a file, of course you'd need --progress independently.

> Should this use start_progress_delay()? In most cases the command will
> complete very quickly, and the progress report is just noise. For many
> commands (e.g., checkout) we wait 1-2 seconds before bothering to show
> progress output.

It is better to use the "delay" version for progress meters for commands that may or may not last very long, and this may be a good candidate to heed that principle.

The subcommands that use start_progress() tend to be older and more batch oriented operations, e.g. fsck, pack-objects, etc., that are expected to last longer. It may be a good idea to convert them to the "delay" variant, but obviously that is outside the scope of this patch.

Show 11 quoted lines
> I would have expected this to say "Generating patches"; most of our
> other progress messages are pluralized. You could use Q_() to handle the
> mono/plural case, but I think it's fine to just always say "patches"
> (that's what other messages do).
>
> One final thought is whether callers would want to customize this
> message, since it will often be used as plumbing. E.g., would rebase
> want to say something besides "Generating patches". I'm not sure.
> Anyway, if you're interested in that direction, there's prior art in
> the way rev-list handles "--progress" (and its sole caller,
> check_connected()).
These are all good suggestions.
Previous: Jeff KingNext: Johannes Schindelin
Message 6 of 34 in “Add progress to format-patch and rebase”
  1. 0/2 Add progress to format-patch and rebaseKevin Willford, May 31, 2017
  2. 1/2 format-patch: have progress option while generating patchesKevin Willford, May 31, 2017
  3. Stefan BellerMay 31, 2017
  4. Kevin WillfordMay 31, 2017
  5. Jeff KingMay 31, 2017
  6. Junio C HamanoJun 1, 2017
  7. Johannes SchindelinJun 1, 2017
  8. Jeff KingJun 1, 2017
  9. 2/2 rebase: turn on progress option by default for format-patchKevin Willford, May 31, 2017
  10. Stefan BellerMay 31, 2017
  11. Kevin WillfordMay 31, 2017
  12. Stefan BellerMay 31, 2017
  13. Johannes SchindelinJun 1, 2017
  14. Jeff KingMay 31, 2017
  15. Junio C HamanoJun 3, 2017
  16. 0/2 Add progress for format-patch and rebaseKevin Willford, Aug 10, 2017
  17. 2/2 rebase: turn on progress option by default for format-patchKevin Willford, Aug 10, 2017
  18. Junio C HamanoAug 11, 2017
  19. 1/2 format-patch: have progress option while generating patchesKevin Willford, Aug 10, 2017
  20. Jeff KingAug 10, 2017
  21. Junio C HamanoAug 11, 2017
  22. Philip OakleyAug 12, 2017
  23. Jeff KingAug 13, 2017
  24. Junio C HamanoAug 14, 2017
  25. Junio C HamanoAug 14, 2017
  26. Jeff KingAug 14, 2017
  27. Junio C HamanoAug 14, 2017
  28. Jeff KingAug 14, 2017
  29. Junio C HamanoAug 14, 2017
  30. progress: simplify "delayed" progress APIJunio C Hamano, Aug 19, 2017
  31. Junio C HamanoAug 19, 2017
  32. Jeff KingAug 20, 2017
  33. Junio C HamanoAug 10, 2017
  34. Jeff KingAug 10, 2017

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.