git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fatal output from git-show really wants a terminal
@ 2008-12-10 16:01 Tim Olsen
  2008-12-10 16:10 ` Boyd Stephen Smith Jr.
  2008-12-10 19:46 ` Johannes Sixt
  0 siblings, 2 replies; 13+ messages in thread
From: Tim Olsen @ 2008-12-10 16:01 UTC (permalink / raw)
  To: git

It appears that when outputting a fatal error, git-show will choose
stdout over stderr if stdout is a terminal and stderr is not.  How do I
redirect the error but still allow stdout to be displayed?

~/git$ mkdir test

~/git$ cd test

~/git/test$ git init

~/git/test$ git show 12345

fatal: ambiguous argument '12345': unknown revision or path not in the
working tree.
Use '--' to separate paths from revisions

~/git/test$ git show 12345 2> /dev/null

fatal: ambiguous argument '12345': unknown revision or path not in the
working tree.
Use '--' to separate paths from revisions

~/git/test$ git show 12345 > /dev/null

fatal: ambiguous argument '12345': unknown revision or path not in the
working tree.
Use '--' to separate paths from revisions

~/git/test$ git show 12345 > /dev/null 2> /dev/null

~/git/test$ git show 12345 > /tmp/out 2> /tmp/err

~/git/test$ cat /tmp/out

~/git/test$ cat /tmp/err

fatal: ambiguous argument '12345': unknown revision or path not in the
working tree.
Use '--' to separate paths from revisions

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

end of thread, other threads:[~2008-12-15  8:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-10 16:01 fatal output from git-show really wants a terminal Tim Olsen
2008-12-10 16:10 ` Boyd Stephen Smith Jr.
2008-12-10 19:46 ` Johannes Sixt
2008-12-10 20:10   ` Tim Olsen
2008-12-10 22:24   ` Boyd Stephen Smith Jr.
     [not found]     ` <alpine.DEB.1.00.0812111015140.18321@eeepc-johanness>
2008-12-11 16:51       ` Boyd Stephen Smith Jr.
2008-12-11 21:55         ` Jeff King
2008-12-11 22:45           ` Boyd Stephen Smith Jr.
2008-12-11 22:59             ` Jeff King
2008-12-11 23:03             ` Junio C Hamano
2008-12-15  8:15               ` Junio C Hamano
2008-12-15  8:23                 ` Junio C Hamano
2008-12-15  8:25                 ` Jeff King

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).