From a633fca0c056aa221d23493c276d3713191621b3 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 28 Jul 2006 22:44:25 -0700 Subject: Call setup_git_directory() much earlier This changes the calling convention of built-in commands and passes the "prefix" (i.e. pathname of $PWD relative to the project root level) down to them. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- builtin-add.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'builtin-add.c') diff --git a/builtin-add.c b/builtin-add.c index 3a73a173f7..0fa7dc1f11 100644 --- a/builtin-add.c +++ b/builtin-add.c @@ -123,11 +123,10 @@ static int add_file_to_index(const char *path, int verbose) 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; -- cgit v1.2.3