]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin/notes.c
revert: fix off by one read when searching the end of a commit subject
[git.git] / builtin / notes.c
index da504ee0af5dab303add0ddf210a7953ca87ae9d..f678f9cb520fa331de4899e372502cffccd9682c 100644 (file)
@@ -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);