RFD: should git rev-parse exit with non-zero status if ref@{n} is not valid?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]