Fix typo in nedmalloc warning fix
[gitweb.git] / builtin-add.c
index 314380eed054d97658d2f3256c62cd5e6880cbb0..c1b229a9d8a026ec88cdbf0492856021cacc8097 100644 (file)
@@ -63,7 +63,7 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p
        fill_pathspec_matches(pathspec, seen, specs);
 
        for (i = 0; i < specs; i++) {
-               if (!seen[i] && !file_exists(pathspec[i]))
+               if (!seen[i] && pathspec[i][0] && !file_exists(pathspec[i]))
                        die("pathspec '%s' did not match any files",
                                        pathspec[i]);
        }
@@ -298,7 +298,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
        int add_new_files;
        int require_pathspec;
 
-       argc = parse_options(argc, argv, builtin_add_options,
+       argc = parse_options(argc, argv, prefix, builtin_add_options,
                          builtin_add_usage, PARSE_OPT_KEEP_ARGV0);
        if (patch_interactive)
                add_interactive = 1;