Re: [PATCH] git-completion.bash: Silence not a valid object errors
-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- -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] git-completion.bash: Silence not a valid object errors
Dylan Smith 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 > --- 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,$, , -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] git-completion.bash: Silence not a valid object errors
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 > --- Thanks, I've been annoyed by this, too. The fix looks obviously correct. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html