Re: CR codes from git commands

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

 



On Tue, 20 Jan 2009, Brent Goodrick wrote:

> 
> Hi,
> 
> I am considering converting from CVS over to using git. I'm currently
> using git version 1.5.6.5 on Debian Linux "testing". One of the first
> things I ran into was having to set PAGER to "cat" to avoid the
> problems when running git from anything other than a terminal.  The
> second thing is that "git pull" (and possibly other commands) are
> emitting ^M (octal 013) codes on output, possibly caused by the same
> assumption as causes the problem that is fixed by setting PAGER to
> "cat".  This is not a big deal on small repos, but on larger ones I
> actually do want to see status line output (or be given some option to
> see them), so that I can then run "tail -1lf" on the log file that is
> written during a long "git pull" operation.

It's kind of unclear what you're trying to do here. I'm guessing that 
you're trying to run git with stdio directed to a /dev/tty device, where 
isatty() is true, but which doesn't interpret ASCII control characters as 
such. We're not detecting that you can't use a pager on this, and so you 
have to use PAGER=cat (which might not be a bad idea for things like 
"man", either). With some clues about the environment, we should be able 
to do something about this.

You're also trying to send the progress output to a log file that you can 
look at the end of (presumably in a more capable terminal). It should be 
possible (with an option) to get git to output progress info to a non-tty, 
and not use the CRs if the output isn't a tty.

Or do you want to use a tty that can't handle CRs, and get newlines 
instead of CRs? (If I'd git on the first computer I used, it would have 
printed the progress bar over and over in place and probably torn a hole 
in the paper, but I haven't used that one in over 20 years.)

	-Daniel
*This .sig left intentionally blank*
--
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