rev-parse: teach "--verify" to be quiet when using "-q" or "--quiet"

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 <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Christian Couder
2008-04-26 13:57:23 +02:00
committed by Junio C Hamano
parent 36c79d2bf8
commit b1b359699a
2 changed files with 21 additions and 4 deletions

View File

@ -52,6 +52,11 @@ OPTIONS
The parameter given must be usable as a single, valid
object name. Otherwise barf and abort.
-q, --quiet::
Only meaningful in `--verify` mode. Do not output an error
message if the first argument is not a valid object name;
instead exit with non-zero status silently.
--sq::
Usually the output is made one line per flag and
parameter. This option makes output a single line,