git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 27, 2008, 06:16 UTC
Message-ID
<7vabjfizz8.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080426135723.2b9e7c16.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> writes:
Show 19 quoted lines
> 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>
> ---
>  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.

Previous: Christian Couder
Message 2 of 2 in “rev-parse: teach "--verify" to be quiet when using "-q" or "--quiet"”
  1. rev-parse: teach "--verify" to be quiet when using "-q" or "--quiet"Christian Couder, Apr 26, 2008
  2. Junio C HamanoApr 27, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.