diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-05-11 12:08:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-11 12:08:20 -0700 |
commit | dccb3a6acbb2e7c6a405fe67b6487aaee0cf1977 (patch) | |
tree | 936ed4d96eea5d08923a333560e53144c2f9d468 /builtin-commit.c | |
parent | rev-parse --verify: do not output anything on error (diff) | |
parent | Optimize symlink/directory detection (diff) | |
download | tgif-dccb3a6acbb2e7c6a405fe67b6487aaee0cf1977.tar.xz |
Merge branch 'lt/core-optim'
* lt/core-optim:
Optimize symlink/directory detection
Avoid some unnecessary lstat() calls
is_racy_timestamp(): do not check timestamp for gitlinks
diff-lib.c: rename check_work_tree_entity()
diff: a submodule not checked out is not modified
Add t7506 to test submodule related functions for git-status
t4027: test diff for submodule with empty directory
Make git-add behave more sensibly in a case-insensitive environment
When adding files to the index, add support for case-independent matches
Make unpack-tree update removed files before any updated files
Make branch merging aware of underlying case-insensitive filsystems
Add 'core.ignorecase' option
Make hash_name_lookup able to do case-independent lookups
Make "index_name_exists()" return the cache_entry it found
Move name hashing functions into a file of its own
Make unpack_trees_options bit flags actual bitfields
Diffstat (limited to 'builtin-commit.c')
-rw-r--r-- | builtin-commit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin-commit.c b/builtin-commit.c index 256181a68b..6433f86cbb 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -175,9 +175,11 @@ static void add_remove_files(struct path_list *list) { int i; for (i = 0; i < list->nr; i++) { + struct stat st; struct path_list_item *p = &(list->items[i]); - if (file_exists(p->path)) - add_file_to_cache(p->path, 0); + + if (!lstat(p->path, &st)) + add_to_cache(p->path, &st, 0); else remove_file_from_cache(p->path); } |