X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin%2Fnotes.c;h=190005f3cd44a35a6fffb20b1e4c74622b4d93f7;hb=314eeb6e483350cc7ef0bee0498ff24a12346495;hp=648033c27e75e9a19e9fd3a2fa21b2e26b19d5ac;hpb=6cd52edbbd9acc7797cffeba1b849538285ed558;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);