Re: CR codes from git commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux