]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/notes.c
Merge branch 'jn/grep-open'
[thirdparty/git.git] / builtin / notes.c
index 648033c27e75e9a19e9fd3a2fa21b2e26b19d5ac..190005f3cd44a35a6fffb20b1e4c74622b4d93f7 100644 (file)
@@ -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);