{"thread":{"id":"25607","subject":"can't redirect git's progress output (stderr)","startedAt":"2010-11-01T12:40:30Z","lastAt":"2010-11-01T20:38:10Z","messageCount":3,"participants":["Delan Azabani","Andreas Schwab","Torsten Bögershausen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"154928","messageId":"4CCEB53E.9080102@azabani.com","threadId":"25607","inReplyTo":null,"subject":"can't redirect git's progress output (stderr)","fromName":"Delan Azabani","fromEmail":"delan@azabani.com","sentAt":"2010-11-01T12:40:30Z","receivedAt":"2010-11-01T12:40:30Z","isPatch":false,"sender":{"key":"delan@azabani.com","avatar":null},"body":"Hi all,\n\nI'm writing a URI handler for git that uses bash/zenity to allow the\nuser to clone a git repository when a git:// link is clicked in a browser.\n\nI'm having a bit of trouble getting git's output into zenity, however.\ngit outputs its progress messages (everything except the \"Initializing\"\nmessage) on stderr, which shouldn't be a problem. Something weird has\nhappened though; the moment I try to pipe git's stderr to stdout or a\nfile, it disappears.\n\nA simple way to test this:\n\ngit clone git://your.favourite/git/repo 2> file1\ngit clone git://your.favourite/git/repo 2>&1 > file2\n\nfile1 will be empty (why?) and file2 will contain only the\n\"Initializing\" message, which came from stdout.\n\nTL;DR why can't I pipe git's stderr output?\n\nHelp would be greatly appreciated; thanks in advance.\n"},{"id":"154930","messageId":"m2r5f5cdh9.fsf@igel.home","threadId":"25607","inReplyTo":"4CCEB53E.9080102@azabani.com","subject":"Re: can't redirect git's progress output (stderr)","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2010-11-01T14:42:10Z","receivedAt":"2010-11-01T14:42:10Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Delan Azabani <delan@azabani.com> writes:\n\n> TL;DR why can't I pipe git's stderr output?\n\ngit-clone(1):\n\n       --progress\n           Progress status is reported on the standard error stream by default\n           when it is attached to a terminal, unless -q is specified. This\n           flag forces progress status even if the standard error stream is\n           not directed to a terminal.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"154944","messageId":"4CCF2532.3070703@web.de","threadId":"25607","inReplyTo":"4CCEB53E.9080102@azabani.com","subject":"Re: can't redirect git's progress output (stderr)","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2010-11-01T20:38:10Z","receivedAt":"2010-11-01T20:38:10Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"Try\ngit clone git://your.favourite/git/repo > file2 2>&1\n/Torsten\n\n\nOn 01.11.10 13:40, Delan Azabani wrote:\n\n> Hi all,\n>\n> I'm writing a URI handler for git that uses bash/zenity to allow the\n> user to clone a git repository when a git:// link is clicked in a browser.\n>\n> I'm having a bit of trouble getting git's output into zenity, however.\n> git outputs its progress messages (everything except the \"Initializing\"\n> message) on stderr, which shouldn't be a problem. Something weird has\n> happened though; the moment I try to pipe git's stderr to stdout or a\n> file, it disappears.\n>\n> A simple way to test this:\n>\n> git clone git://your.favourite/git/repo 2>  file1\n> git clone git://your.favourite/git/repo 2>&1>  file2\n>\n> file1 will be empty (why?) and file2 will contain only the\n> \"Initializing\" message, which came from stdout.\n>\n> TL;DR why can't I pipe git's stderr output?\n>\n> Help would be greatly appreciated; thanks in advance.\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}