From: Junio C Hamano <gitster@pobox.com>
To: Dylan Smith <dylan.ah.smith@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-completion.bash: Silence not a valid object errors
Date: Fri, 11 Jan 2013 08:45:17 -0800 [thread overview]
Message-ID: <7v6233d5ya.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1301110304220.26739@antec> (Dylan Smith's message of "Fri, 11 Jan 2013 03:06:22 -0500 (EST)")
Dylan Smith <dylan.ah.smith@gmail.com> writes:
> 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>
> ---
Looks obviously correct. Thanks.
> contrib/completion/git-completion.bash | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 0b77eb1..d4c7bfe 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -397,7 +397,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,$, ,
next prev parent reply other threads:[~2013-01-11 16:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-11 8:06 [PATCH] git-completion.bash: Silence not a valid object errors Dylan Smith
2013-01-11 15:27 ` Jeff King
2013-01-11 16:45 ` Junio C Hamano [this message]
2013-01-11 21:12 ` Manlio Perillo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v6233d5ya.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=dylan.ah.smith@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).