From: Junio C Hamano Date: Wed, 27 Aug 2008 23:39:57 +0000 (-0700) Subject: Merge branch 'jc/add-addremove' X-Git-Tag: v1.6.1-rc1~297 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b46f7e54fcb2d01757d834d14dfd040b6892d695;p=git.git Merge branch 'jc/add-addremove' * jc/add-addremove: builtin-add.c: optimize -A option and "git add ." builtin-add.c: restructure the code for maintainability --- b46f7e54fcb2d01757d834d14dfd040b6892d695 diff --cc builtin-add.c index 81b64d7b9,1834e2d7c..7c874e311 --- a/builtin-add.c +++ b/builtin-add.c @@@ -288,16 -245,8 +255,8 @@@ int cmd_add(int argc, const char **argv fprintf(stderr, "Maybe you wanted to say 'git add .'?\n"); return 0; } - pathspec = get_pathspec(prefix, argv); + pathspec = validate_pathspec(argc, argv, prefix); - /* - * If we are adding new files, we need to scan the working - * tree to find the ones that match pathspecs; this needs - * to be done before we read the index. - */ - if (add_new_files) - fill_directory(&dir, pathspec, ignored_too); - if (read_cache() < 0) die("index file corrupt");