Skip to content

Commit

Permalink
git-completion.bash: silence "not a valid object" errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dylan Smith authored and Junio C Hamano committed Jan 11, 2013
1 parent bafc478 commit ca87dd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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,$, ,
Expand Down

0 comments on commit ca87dd6

Please sign in to comment.