1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-27 15:46:14 +02:00

rev-parse: fix --verify to error out when passed junk after a good rev

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 <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Christian Couder 2008-04-26 15:19:29 +02:00 committed by Junio C Hamano
parent 498a6e7eaa
commit 75ecfce397

View File

@ -576,11 +576,11 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
show_rev(REVERSED, sha1, arg+1);
continue;
}
if (verify)
die_no_single_rev(quiet);
as_is = 1;
if (!show_file(arg))
continue;
if (verify)
die_no_single_rev(quiet);
verify_filename(prefix, arg);
}
show_default();