summaryrefslogtreecommitdiff
path: root/builtin-rev-parse.c
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2008-04-26 13:19:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-04-27 20:19:46 (GMT)
commit75ecfce39703e15a9f3d812faa4eb039935c8962 (patch)
tree6d69d31b281540dbb987d7e3724e6562a4477a25 /builtin-rev-parse.c
parent498a6e7eaaa8d2641f7cc343e1557e1502437b33 (diff)
downloadgit-75ecfce39703e15a9f3d812faa4eb039935c8962.zip
git-75ecfce39703e15a9f3d812faa4eb039935c8962.tar.gz
git-75ecfce39703e15a9f3d812faa4eb039935c8962.tar.bz2
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 9384a99..0e59707 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();