Merge branch 'jc/add-addremove'
authorJunio C Hamano <gitster@pobox.com>
Wed, 27 Aug 2008 23:39:57 +0000 (16:39 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 Aug 2008 23:39:57 +0000 (16:39 -0700)
* jc/add-addremove:
  builtin-add.c: optimize -A option and "git add ."
  builtin-add.c: restructure the code for maintainability

1  2 
builtin-add.c
cache.h
read-cache.c

diff --cc builtin-add.c
index 81b64d7b9d69f06fff70870e8a55fc4ad506133e,1834e2d7cd50ec7688ec6c5c7d2c79c8513ed132..7c874e31154a4c3f96b3403db1bdcb0b36fdec3e
@@@ -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");
  
diff --cc cache.h
Simple merge
diff --cc read-cache.c
Simple merge