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

Re: CR codes from git commands

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 23, 2009, 18:41 UTC
Message-ID
<alpine.DEB.1.00.0901231747340.21467@intel-tinevez-2-302>
In-Reply-To
<18809.60512.654436.59819@hungover.brentg.com>
Hi,
On Fri, 23 Jan 2009, Brent Goodrick wrote:
>  - Bare minimum: Add a new --no-cr option

I do not see any value of this over "--progress | tr '\r' '\n'". (The --progress option being the natural counterpart to --no-progress, _forcing_ the display of the progress.)

And I disagree that --no-progress would be hard to implement. Just have a look at 7d1864c(Introduce is_bare_repository() and core.bare configuration variable).

Basically, you'll have to
- introduce a global variable to both environment.c and cache.h,
- set it to -1 by default,
- handle a "--progress" and "--no-progress" option in git.c, setting the 
  global variable git_show_progress to 1 or 0, respectively,
- teach start_progress_delay() to return NULL if git_show_progress == 0,
- modify all users of start_progress*() to respect git_show_progress == 1,
  which probably means to look for "isatty" in builtin-pack-objects.c and 
  builtin-unpack-objects.c
- add documentation to Documentation/git.txt what --progress and 
  --no-progress do,
- add a simple test script to t/ (maybe t/t0005-progress.sh) that tests 
  that --progress works -- maybe you find a clever way to test 
  --no-progress, too, but that would be harder, as the progress is turned 
  off by default for the scripts anyway...)

Hth, Dscho

Previous: Junio C HamanoNext: Brent Goodrick
Message 15 of 24 in “CR codes from git commands”
  1. Brent GoodrickJan 20, 2009
  2. Johannes SchindelinJan 20, 2009
  3. Daniel BarkalowJan 22, 2009
  4. Brent GoodrickJan 22, 2009
  5. Daniel BarkalowJan 22, 2009
  6. Junio C HamanoJan 22, 2009
  7. Mike RalphsonJan 22, 2009
  8. Brent GoodrickJan 22, 2009
  9. Mike RalphsonJan 22, 2009
  10. Johannes SchindelinJan 22, 2009
  11. Daniel BarkalowJan 22, 2009
  12. Johannes SchindelinJan 22, 2009
  13. Brent GoodrickJan 23, 2009
  14. Junio C HamanoJan 23, 2009
  15. Johannes SchindelinJan 23, 2009
  16. Brent GoodrickJan 24, 2009
  17. Johannes SchindelinJan 24, 2009
  18. Boyd Stephen Smith Jr.Jan 25, 2009
  19. Brent GoodrickJan 25, 2009
  20. Brent GoodrickFeb 2, 2009
  21. The lifecycle of a patch and the maintainer involvementJunio C Hamano, Jan 25, 2009
  22. Brent GoodrickJan 21, 2009
  23. Johannes SchindelinJan 21, 2009
  24. Brent GoodrickJan 22, 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.