read-cache: tweak racy-git delay logic
[gitweb.git] / builtin-add.c
index 72d2853176f9c6d8b7c678bce64f5f482c2c5345..096b611b5b0eef1c5a96dcaddc21aa874bdaee29 100644 (file)
@@ -84,11 +84,10 @@ static void fill_directory(struct dir_struct *dir, const char **pathspec)
 
 static struct lock_file lock_file;
 
-int cmd_add(int argc, const char **argv, char **envp)
+int cmd_add(int argc, const char **argv, const char *prefix)
 {
        int i, newfd;
        int verbose = 0, show_only = 0;
-       const char *prefix = setup_git_directory();
        const char **pathspec;
        struct dir_struct dir;
 
@@ -118,7 +117,7 @@ int cmd_add(int argc, const char **argv, char **envp)
                        verbose = 1;
                        continue;
                }
-               die(builtin_add_usage);
+               usage(builtin_add_usage);
        }
        pathspec = get_pathspec(prefix, argv + i);