git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Exit status of git show-ref --verify
@ 2020-07-06 18:55 Marc Legendre
  0 siblings, 0 replies; only message in thread
From: Marc Legendre @ 2020-07-06 18:55 UTC (permalink / raw)
  To: git

Hi,

I stumbled upon a small discrepancy between the documentation of git-show-ref
and its actual behavior. The documentation of the `--verify` flag of
git-show-ref says:

  "If nothing matches, 'git show-ref' will return an error code of 1"

Yet it seems to return 1 only if it is also called with --quiet. Tested with
the `next` branch:

  [~/dev/git] $ ./git show-ref --verify refs/heads/tagada
  fatal: 'refs/heads/tagada' - not a valid ref
  [~/dev/git] $ echo $?
  128

  [~/dev/git] $ ./git show-ref --quiet --verify refs/heads/tagada
  [~/dev/git] $ echo $?
  1


Regards,
Marc Legendre


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-06 18:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06 18:55 Exit status of git show-ref --verify Marc Legendre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).