X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin%2Fnotes.c;h=190005f3cd44a35a6fffb20b1e4c74622b4d93f7;hb=ad9ac6db5d58de08d0497b9184e86926377c20dd;hp=648033c27e75e9a19e9fd3a2fa21b2e26b19d5ac;hpb=5bebcd4ecba0791cecaa49d30ddd7ca8ffe03627;p=git.git diff --git a/builtin/notes.c b/builtin/notes.c index 648033c27..190005f3c 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -313,7 +313,7 @@ int commit_notes(struct notes_tree *t, const char *msg) return 0; } -combine_notes_fn *parse_combine_notes_fn(const char *v) +combine_notes_fn parse_combine_notes_fn(const char *v) { if (!strcasecmp(v, "overwrite")) return combine_notes_overwrite; @@ -614,6 +614,10 @@ static int copy(int argc, const char **argv, const char *prefix) } } + if (argc < 2) { + error("too few parameters"); + usage_with_options(git_notes_copy_usage, options); + } if (2 < argc) { error("too many parameters"); usage_with_options(git_notes_copy_usage, options);