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

Re: [PATCH v2] checkout: no progress messages if !isatty(2).

From
Jeff King <peff@peff.net>
Date
May 24, 2012, 18:34 UTC
Message-ID
<20120524183457.GA11841@sigill.intra.peff.net>
In-Reply-To
<7vy5ohwhy7.fsf@alter.siamese.dyndns.org>
On Thu, May 24, 2012 at 11:29:52AM -0700, Junio C Hamano wrote:
Show 7 quoted lines
> I do not seem to find a sane justification for
> 
> 	git $cmd --progress 2>output
> 
> use case and I do not immediately see how that "output" file can be
> useful.  But we've allowed it for a long time, so probably this version is
> safer.  Besides, it is more explicit.

Actually, I ran across a case of this just recently. If you are writing a graphical interface that wraps git, scraping "--progress" output from a pipe is the only way you can provide a progress meter within your interface. That is what the "GitHub for {Mac,Windows}" interfaces do (they also use libgit2 where possible, but it is far from feature complete).

-Peff
Previous: Junio C HamanoNext: Avery Pennarun
Message 7 of 11 in “progress: don't print if !isatty(2).”
  1. progress: don't print if !isatty(2).Avery Pennarun, May 24, 2012
  2. Jeff KingMay 24, 2012
  3. checkout: default to quiet if !isatty(2).Avery Pennarun, May 24, 2012
  4. Jeff KingMay 24, 2012
  5. checkout: no progress messages if !isatty(2).Avery Pennarun, May 24, 2012
  6. Junio C HamanoMay 24, 2012
  7. Jeff KingMay 24, 2012
  8. Avery PennarunMay 24, 2012
  9. Avery PennarunMay 24, 2012
  10. Junio C HamanoMay 24, 2012
  11. Avery PennarunMay 24, 2012

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.