Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] rev-parse: fix --verify to error out when passed junk after a good rev

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:32

Christian Couder [off-list ref] writes:
Before this patch something like:

$ git rev-parse --verify <good-rev> <junk>

worked whatever junk was as long as <good-rev> could be parsed
correctly.

This patch makes "git rev-parse --verify" error out when passed
any junk after a good rev.

Signed-off-by: Christian Couder <redacted>
---
 builtin-rev-parse.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

	With this patch something like:

	$ git rev-parse --verify <good1> <good2>

	will still fail.
I think this should fail.

I've long thought that ideally giving anything but a single good rev to
"rev-parse --verify" should fail before spitting anything out.  This, like
other reponses to errorneous inputs, were what we considered of lower
priority in early days of git (think "before the end of 2005"), because we
had many other "better and more urgent" things to worry about.  I think we
have long passed that stage.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help