summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-05-22 19:41:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-05-22 19:41:46 (GMT)
commit44fa79679363e96880534c68d34beb4d361498e1 (patch)
tree2c9bc2156655f792896dbd8f9fbf229d341df21a
parent39fa79178feb1ce72050ebd21b9e34f158e8befa (diff)
parent7886cfa08054046a7a82726be4b8c109b2ba1344 (diff)
downloadgit-44fa79679363e96880534c68d34beb4d361498e1.zip
git-44fa79679363e96880534c68d34beb4d361498e1.tar.gz
git-44fa79679363e96880534c68d34beb4d361498e1.tar.bz2
Merge branch 'ps/bundle-verify-arg'
"git bundle verify" did not diagnose extra parameters on the command line. * ps/bundle-verify-arg: bundle: verify arguments more strictly
-rw-r--r--builtin/bundle.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/builtin/bundle.c b/builtin/bundle.c
index 92a8a60..4883a43 100644
--- a/builtin/bundle.c
+++ b/builtin/bundle.c
@@ -42,6 +42,10 @@ int cmd_bundle(int argc, const char **argv, const char *prefix)
if (!strcmp(cmd, "verify")) {
close(bundle_fd);
+ if (argc != 1) {
+ usage(builtin_bundle_usage);
+ return 1;
+ }
if (verify_bundle(&header, 1))
return 1;
fprintf(stderr, _("%s is okay\n"), bundle_file);
@@ -52,6 +56,10 @@ int cmd_bundle(int argc, const char **argv, const char *prefix)
return !!list_bundle_refs(&header, argc, argv);
}
if (!strcmp(cmd, "create")) {
+ if (argc < 2) {
+ usage(builtin_bundle_usage);
+ return 1;
+ }
if (!startup_info->have_repository)
die(_("Need a repository to create a bundle."));
return !!create_bundle(&header, bundle_file, argc, argv);