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

can't redirect git's progress output (stderr)

From
DADelan Azabani <delan@azabani.com>
Date
Nov 1, 2010, 12:40 UTC
Message-ID
<4CCEB53E.9080102@azabani.com>
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.
Next: Andreas Schwab
Message 1 of 3 in “can't redirect git's progress output (stderr)”
  1. Delan AzabaniNov 1, 2010
  2. Andreas SchwabNov 1, 2010
  3. Torsten BögershausenNov 1, 2010

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.