* [PATCH] git-completion.bash: Silence not a valid object errors
@ 2013-01-11 8:06 Dylan Smith
2013-01-11 15:27 ` Jeff King
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dylan Smith @ 2013-01-11 8:06 UTC (permalink / raw)
To: git
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>
---
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,$, ,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] git-completion.bash: Silence not a valid object errors
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
2013-01-11 21:12 ` Manlio Perillo
2 siblings, 0 replies; 4+ messages in thread
From: Jeff King @ 2013-01-11 15:27 UTC (permalink / raw)
To: Dylan Smith; +Cc: git
On Fri, Jan 11, 2013 at 03:06:22AM -0500, Dylan Smith wrote:
> 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>
> ---
Thanks, I've been annoyed by this, too. The fix looks obviously correct.
-Peff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] git-completion.bash: Silence not a valid object errors
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
2013-01-11 21:12 ` Manlio Perillo
2 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2013-01-11 16:45 UTC (permalink / raw)
To: Dylan Smith; +Cc: git
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,$, ,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] git-completion.bash: Silence not a valid object errors
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
@ 2013-01-11 21:12 ` Manlio Perillo
2 siblings, 0 replies; 4+ messages in thread
From: Manlio Perillo @ 2013-01-11 21:12 UTC (permalink / raw)
To: Dylan Smith; +Cc: git
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Il 11/01/2013 09:06, Dylan Smith ha scritto:
> 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.
>
I reported the problem a few weeks ago; thanks.
> [...]
Regards Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlDwgCAACgkQscQJ24LbaUTAxgCfZbB8X8IaTZAcT8iTs1XIILBJ
72MAn2zlh3xbRa/wjq1WyA2yOiAlaCr7
=dMN7
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-11 21:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2013-01-11 21:12 ` Manlio Perillo
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).