Thread (18 messages) flat view 18 messages, 3 authors, 2016-06-15
DORMANTno replies

Revision v2 of 2 in this series.

Revisions (2)
  1. v2 current
  2. v3 [diff vs current]

[PATCH v2 0/2] rev-parse: strengthen validation of ref@{n} references

From: Jon Seymour <hidden>
Date: 2016-06-15 22:49:22

This series changes git rev-parse so that references of the form:

	ref@{n}

cause rev-parse to fail with a non-zero status code if n >= size of the 
reference log for ref.

The first commit implements the changed behaviour, the second commit 
updates the tests to include tests for the changed behaviour.

This is the second revision of this series. It differs from the first
in that it uses die rather than error to report the condition
and thus exits early, without generating any output on stdout
for the failing argument. It also reports just a single fatal
message instead of both an error message and a fatal message.

The original patch and this revision are both based on suggestions
from Junio.

Jon Seymour (2):
  rev-parse: exit with non-zero status if ref@{n} is not valid.
  rev-parse: tests git rev-parse --verify master@{n}, for various n

 sha1_name.c                    |   20 +++++++++++---------
 t/t1503-rev-parse-verify.sh    |   11 +++++++++++
 t/t1506-rev-parse-diagnosis.sh |    9 +++++++++
 3 files changed, 31 insertions(+), 9 deletions(-)

-- 
1.7.2.1.99.geab11
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help