git push writes to stderr instead of stdout on success
git push writes to stderr instead of stdout
Steps to reproduce:
mkdir foo
cd foo
git init
echo foo > fo
git add -A
git commit -am "foo"
git push . HEAD:refs/heads/newbranch 2>out
Expected: out file is empty
Actual: out file contents:
To .
* [new branch] HEAD -> newbranch
Quoted 1 line · Marat Radchenko
git pushwrites to stderr instead of stdout
That's by design.
Which one is correct is largely a matter of philosophy / mental model. This case has been discussed before:
http://thread.gmane.org/gmane.comp.version-control.git/180673
Keep in mind also that "git push --porcelain" does go to stdout and is machine-parsed, so no other messages can go to stdout when that option is enabled.
-Peff
Quoted 6 lines · Jeff King
Quoted 1 line · Marat Radchenko
git pushwrites to stderr instead of stdoutThat's by design.
Quoted 8 lines
Which one is correct is largely a matter of philosophy / mental model. This case has been discussed before:
http://thread.gmane.org/gmane.comp.version-control.git/180673
Keep in mind also that "git push --porcelain" does go to stdout and is machine-parsed, so no other messages can go to stdout when that option is enabled.
Oh, missed --porcelain switch. Thanks.