Dear helpful git-using lazyweb,
Thanks for the answers to the previous question. I have another question. I see this:
$ git fetch -q >/dev/null
From git://camel/perl
249829c..ba2d061 blead -> origin/blead
Is there any way to run git fetch such that it produces no summary output to stderr, unless there is an error. I don't want to hack up a parser for "expected noise", and I don't want a cron job mailing me every time if "nothing is wrong". It's not clear from the man page that this is possible, and the "obvious" above doesn't work. Heck, even forcibly ensuring that nothing is a tty still doesn't work:
$ git fetch -q 2>&1 >/dev/null </dev/null | cat
From nicholas@perl5.git.perl.org:/gitroot/perl
249829c..ba2d061 blead -> origin/blead
(That's on a different machine. I don't have a test remote repository where I generate commits to try things out. That feels futile.)
Broken redirect (Score:1)
$ (echo foo >&2) 2>&1 >/dev/null
foo
$ (echo foo >&2) >/dev/null 2>&1
$
Re: (Score:1)
Funny redirecting? (Score:1)
Uh... wouldn't "2>&1 >/dev/null" just put what's going to stderr to stdout and what's going to stdout to nothing, as opposed to both stderr and stdout to nothing?
I think you need "2>/dev/null" for what you want.
The new Strawberry Perl for Windows has been released! Check http://strawberryperl.com for it.
Re: (Score:2)
Yes.
No. :-)
I'm relying on the order of parsing of pipes and redirection.
git fetch -q 2>&1 >/dev/null </dev/null | catis parsed as run this:piped to that:
Then,
git fetch -q 2>&1 >/dev/null </dev/nullisRe: (Score:1)
The new Strawberry Perl for Windows has been released! Check http://strawberryperl.com for it.
Reading the source suggests... (Score:1)
-qq, though I'm not sure exactly where that's supposed to be documented.Upgrade time... (Score:1)
This just works as expected with single -q on git 1.6.4 (and doesn't on 1.5.2.1).
Time to upgrade... :-)