Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2008-04-26 17:19:29 +0400
committerJunio C Hamano <gitster@pobox.com>2008-04-28 00:19:46 +0400
commit75ecfce39703e15a9f3d812faa4eb039935c8962 (patch)
tree6d69d31b281540dbb987d7e3724e6562a4477a25 /builtin-rev-parse.c
parent498a6e7eaaa8d2641f7cc343e1557e1502437b33 (diff)
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();