Skip to content

Commit ca87dd6

Browse files
dylanahsmithgitster
authored andcommitted
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 <[email protected]> Reviewed-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bafc478 commit ca87dd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ __git_complete_revlist_file ()
676676
*) pfx="$ref:$pfx" ;;
677677
esac
678678

679-
__gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \
679+
__gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" 2>/dev/null \
680680
| sed '/^100... blob /{
681681
s,^.* ,,
682682
s,$, ,

0 commit comments

Comments
 (0)