diff options
author | Dylan Smith <dylan.ah.smith@gmail.com> | 2013-01-11 03:06:22 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-11 08:44:08 -0800 |
commit | ca87dd623d24590c4d48a922effa1d9e1e1fd253 (patch) | |
tree | 9b8b5c438c1b8f701f606712795b6e87caf9547c /contrib/completion | |
parent | Git 1.7.11.7 (diff) | |
download | tgif-ca87dd623d24590c4d48a922effa1d9e1e1fd253.tar.xz |
git-completion.bash: silence "not a valid object" errors
Trying to complete the command
git show master:./file
would cause a "Not a valid object name" error to be output on standard
error. Silence the error so it won't appear on the command line.
Signed-off-by: Dylan Smith <dylan.ah.smith@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion')
-rwxr-xr-x | contrib/completion/git-completion.bash | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 2e1b5e14b9..6312e3d8eb 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -676,7 +676,7 @@ __git_complete_revlist_file () *) pfx="$ref:$pfx" ;; esac - __gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \ + __gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" 2>/dev/null \ | sed '/^100... blob /{ s,^.* ,, s,$, , |