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>
Dylan Smith committed
Jan 11, 2013 at 03:06 UTC
ca87dd623d24590c4d48a922effa1d9e1e1fd253
1 file changed
+1
-1
contrib/completion/git-completion.bash
+1
-1
@@ -676,7 +676,7 @@ __git_complete_revlist_file ()
676
*) pfx="$ref:$pfx" ;;
677
esac
678
679
- __gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \
679
+ __gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" 2>/dev/null \
680
| sed '/^100... blob /{
681
s,^.* ,,
682
s,$, ,