git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* RFD: should git rev-parse exit with non-zero status if ref@{n} is not valid?
@ 2010-08-18 11:36 Jon Seymour
  2010-08-18 11:41 ` Jon Seymour
  2010-08-18 20:50 ` Junio C Hamano
  0 siblings, 2 replies; 20+ messages in thread
From: Jon Seymour @ 2010-08-18 11:36 UTC (permalink / raw)
  To: Git Mailing List

While reworking my detached-stash topic, I noticed that git rev-parse
ref@{n} will exit with a warning message on stderr, the SHA1 of ref
and a non-zero exit code if ref exists, but ref@{n} does not.

I understand why ref@{time-spec} might behave this way, but I reckon
that if you ask for ref@{n} for n > N-1, where N is the length of the
reflog, then you should either get empty output and a non-zero status
(preferred) or a ref@{N-1} on the output with a status code of zero
and a warning message (less optimal, IMHO).

What say the list?

jon.

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2010-08-24  4:53 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-18 11:36 RFD: should git rev-parse exit with non-zero status if ref@{n} is not valid? Jon Seymour
2010-08-18 11:41 ` Jon Seymour
2010-08-18 20:50 ` Junio C Hamano
2010-08-18 23:02   ` Jon Seymour
2010-08-21  1:43     ` [PATCH 0/4] rev-parse: improve reporting of invalid log references Jon Seymour
2010-08-21  1:43     ` [PATCH 1/4] rev-parse: exit with non-zero status if ref@{n} is not valid Jon Seymour
2010-08-21  1:43     ` [PATCH 2/4] rev-parse: suppress duplicate log limit exceeded message Jon Seymour
2010-08-22 21:20       ` Junio C Hamano
2010-08-23 14:59         ` Jon Seymour
2010-08-23 16:33           ` Junio C Hamano
2010-08-23 23:11             ` [PATCH v2 0/2] rev-parse: strengthen validation of ref@{n} references Jon Seymour
2010-08-23 23:11             ` [PATCH v2 1/2] rev-parse: exit with non-zero status if ref@{n} is not valid Jon Seymour
2010-08-24  0:14               ` Jonathan Nieder
2010-08-24  4:52                 ` [PATCH v3 0/3] rev-parse: strengthen validation of ref@{n} references Jon Seymour
2010-08-24  4:52                 ` [PATCH v3 1/3] rev-parse: exit with non-zero status if ref@{n} is not valid Jon Seymour
2010-08-24  4:52                 ` [PATCH v3 2/3] sha1_name.c: use warning in preference to fprintf(stderr Jon Seymour
2010-08-24  4:52                 ` [PATCH v3 3/3] rev-parse: tests git rev-parse --verify master@{n}, for various n Jon Seymour
2010-08-23 23:11             ` [PATCH v2 2/2] " Jon Seymour
2010-08-21  1:43     ` [PATCH 3/4] rev-parse: introduce get_sha1_gently Jon Seymour
2010-08-21  1:43     ` [PATCH 4/4] rev-parse: tests that git rev-parse --verify master@{n} Jon Seymour

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).