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

Re: [BUG (maybe)] git rev-parse --verify --quiet isn't quiet

From
Øystein Walle <oystwa@gmail.com>
Date
Sep 5, 2014, 07:15 UTC
Message-ID
<loom.20140905T085616-576@post.gmane.org>
In-Reply-To
<xmqqppfbtfu0.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster <at> pobox.com> writes:
Show 13 quoted lines
> 
> Junio C Hamano <gitster <at> pobox.com> writes:
> 
> > I would suspect that this may be fine.
> >
> > "rev-parse --verify" makes sure the named object exists, but in this
> > case  <at> {u} does not even name any object, does it?
> 
> Hmph, but "rev-parse --verify no-such-branch" does *not* name any
> object, we would want to see it barf, and we probably would want to
> be able to squelch the message.  So it is unclear if  <at> {u} barfing is
> a good idea.
> 

That was my counter-argument :) The "vibe" I get from rev-parse --verify --quiet is that it should handle anything.

> 
> What is the reason why it is inpractical to pass 'quiet' down the
> callchain?
> 

Maybe I'm missing something obvious, but wouldn't that mean changing the signature of 9 different functions, and consequently all of their calls throughout Git?

That's perhaps not a good argument. Who cares whether a diff is small or large if it fixes a bug properly? But most (or all) of those functions do not concern themselves with printing stuff so maybe an additional "quiet?" argument would look foreign in most places and make the code harder to read.

Øsse
Previous: Junio C Hamano
Message 4 of 4 in “[BUG (maybe)] git rev-parse --verify --quiet isn't quiet”
  1. Øystein WalleSep 4, 2014
  2. Junio C HamanoSep 4, 2014
  3. Junio C HamanoSep 4, 2014
  4. Øystein WalleSep 5, 2014

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.