From: Junio C Hamano Date: Fri, 12 Feb 2016 20:26:24 GMT Subject: Re: [PATCH] git-completion.bash: always swallow error output of for-each-ref Message-ID: In-Reply-To: <20160212201002.GA21598@sigill.intra.peff.net> Jeff King writes: > I agree it's a lot more pleasant, assuming there are no cases where we > would want to pass through an error. But I really cannot think of one. > Even explosive "woah, your git repo is totally corrupted" messages > probably should be suppressed in the prompt. > >> @@ -320,7 +320,7 @@ __git_heads () >> refs/heads >> return >> fi >> -} >> +} 2>/dev/null > > Today I learned about yet another fun corner of POSIX shell. I may have learned about this soon after I started learning bash, but I admit that this was the first time I found a practical use case for it ;-).