Subject: Re: [PATCH] rev-parse: teach "--verify" to be quiet when using "-q" or "--quiet"

From: Junio C Hamano <[email-masked]>
Date: Sat, 26 Apr 2008 23:16:59 -0700

Christian Couder <[email-masked]> writes:

> Currently "git rev-parse --verify <something>" is often used with
> its error output redirected to /dev/null. This patch makes it
> easier to do that.
>
> The -q|--quiet option is designed to work the same way as it does
> for "git symbolic-ref".
>
> Signed-off-by: Christian Couder <[email-masked]>
> ---
>  Documentation/git-rev-parse.txt |    5 +++++
>  builtin-rev-parse.c             |   20 ++++++++++++++++----
>  2 files changed, 21 insertions(+), 4 deletions(-)
>
> 	By the way it's strange that for example:
>
> 	$ git rev-parse --verify <good-rev> <junk>
>
> 	works whatever <junk> is, as long as <good-rev> can be
> 	parsed.

Very much so.  The earlier plumbing programs tend to have this "works if
you give correct input but sometimes ignores bogosity" tendency.  They are
loose not by design, and we should be able to tighten without worrying
about breaking existing scripts.