summaryrefslogtreecommitdiff
path: root/builtin-rev-parse.c
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2008-04-26 15:19:29 +0200
committerJunio C Hamano <gitster@pobox.com>2008-04-27 13:19:46 -0700
commit75ecfce39703e15a9f3d812faa4eb039935c8962 (patch)
tree6d69d31b281540dbb987d7e3724e6562a4477a25 /builtin-rev-parse.c
parent498a6e7eaaa8d2641f7cc343e1557e1502437b33 (diff)
downloadgit-75ecfce39703e15a9f3d812faa4eb039935c8962.tar.gz
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>
Diffstat (limited to 'builtin-rev-parse.c')
-rw-r--r--builtin-rev-parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-rev-parse.c b/builtin-rev-parse.c
index 9384a991ee..0e59707323 100644
--- a/builtin-rev-parse.c
+++ b/builtin-rev-parse.c
@@ -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();