1
0
mirror of https://github.com/git/git.git synced 2024-10-21 11:38:56 +02:00
git/contrib/completion
SZEDER Gábor e15098a314 completion: consolidate silencing errors from git commands
Outputting error messages during completion is bad: they disrupt the
command line, can't be deleted, and the user is forced to Ctrl-C and
start over most of the time.  We already silence stderr of many git
commands in our Bash completion script, but there are still some in
there that can spew error messages when something goes wrong.

We could add the missing stderr redirections to all the remaining
places, but instead let's leverage that git commands are now executed
through the previously introduced __git() wrapper function, and
redirect standard error to /dev/null only in that function.  This way
we need only one redirection to take care of errors from almost all
git commands.  Redirecting standard error of the __git() wrapper
function thus became redundant, remove them.

The exceptions, i.e. the repo-independent git executions and those in
the __gitdir() function that don't go through __git() already have
their standard error silenced.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-02-03 22:18:41 -08:00
..
git-completion.bash completion: consolidate silencing errors from git commands 2017-02-03 22:18:41 -08:00
git-completion.tcsh git-completion.tcsh: fix redirect with noclobber 2015-06-09 11:21:15 -07:00
git-completion.zsh Merge branch 'pd/completion-filenames-fix' 2015-01-07 13:06:37 -08:00
git-prompt.sh Merge branch 'vs/prompt-avoid-unset-variable' into maint 2016-07-06 13:06:38 -07:00