git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* can't redirect git's progress output (stderr)
@ 2010-11-01 12:40 Delan Azabani
  2010-11-01 14:42 ` Andreas Schwab
  2010-11-01 20:38 ` Torsten Bögershausen
  0 siblings, 2 replies; 3+ messages in thread
From: Delan Azabani @ 2010-11-01 12:40 UTC (permalink / raw)
  To: git

Hi all,

I'm writing a URI handler for git that uses bash/zenity to allow the
user to clone a git repository when a git:// link is clicked in a browser.

I'm having a bit of trouble getting git's output into zenity, however.
git outputs its progress messages (everything except the "Initializing"
message) on stderr, which shouldn't be a problem. Something weird has
happened though; the moment I try to pipe git's stderr to stdout or a
file, it disappears.

A simple way to test this:

git clone git://your.favourite/git/repo 2> file1
git clone git://your.favourite/git/repo 2>&1 > file2

file1 will be empty (why?) and file2 will contain only the
"Initializing" message, which came from stdout.

TL;DR why can't I pipe git's stderr output?

Help would be greatly appreciated; thanks in advance.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: can't redirect git's progress output (stderr)
  2010-11-01 12:40 can't redirect git's progress output (stderr) Delan Azabani
@ 2010-11-01 14:42 ` Andreas Schwab
  2010-11-01 20:38 ` Torsten Bögershausen
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2010-11-01 14:42 UTC (permalink / raw)
  To: delan; +Cc: git

Delan Azabani <delan@azabani.com> writes:

> TL;DR why can't I pipe git's stderr output?

git-clone(1):

       --progress
           Progress status is reported on the standard error stream by default
           when it is attached to a terminal, unless -q is specified. This
           flag forces progress status even if the standard error stream is
           not directed to a terminal.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: can't redirect git's progress output (stderr)
  2010-11-01 12:40 can't redirect git's progress output (stderr) Delan Azabani
  2010-11-01 14:42 ` Andreas Schwab
@ 2010-11-01 20:38 ` Torsten Bögershausen
  1 sibling, 0 replies; 3+ messages in thread
From: Torsten Bögershausen @ 2010-11-01 20:38 UTC (permalink / raw)
  To: delan; +Cc: git

Try
git clone git://your.favourite/git/repo > file2 2>&1
/Torsten


On 01.11.10 13:40, Delan Azabani wrote:

> Hi all,
>
> I'm writing a URI handler for git that uses bash/zenity to allow the
> user to clone a git repository when a git:// link is clicked in a browser.
>
> I'm having a bit of trouble getting git's output into zenity, however.
> git outputs its progress messages (everything except the "Initializing"
> message) on stderr, which shouldn't be a problem. Something weird has
> happened though; the moment I try to pipe git's stderr to stdout or a
> file, it disappears.
>
> A simple way to test this:
>
> git clone git://your.favourite/git/repo 2>  file1
> git clone git://your.favourite/git/repo 2>&1>  file2
>
> file1 will be empty (why?) and file2 will contain only the
> "Initializing" message, which came from stdout.
>
> TL;DR why can't I pipe git's stderr output?
>
> Help would be greatly appreciated; thanks in advance.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-01 20:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-01 12:40 can't redirect git's progress output (stderr) Delan Azabani
2010-11-01 14:42 ` Andreas Schwab
2010-11-01 20:38 ` Torsten Bögershausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).