author | Junio C Hamano <gitster@pobox.com> | |
Tue, 31 Jul 2007 00:12:58 +0000 (17:12 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 31 Jul 2007 00:49:50 +0000 (17:49 -0700) | ||
commit | 0781b8a9b2fe760fc4ed519a3a26e4b9bd6ccffe | |
tree | 5698aa2ab33ca555cca63072fcd881b4fad82e13 | tree | snapshot |
parent | bf655fd7009bf5b8f493c52ca77c0d9e09dcb762 | commit | diff |
add_file_to_index: skip rehashing if the cached stat already matches
An earlier commit 366bfcb6 broke git-add by moving read_cache()
call down, because it wanted the directory walking code to grab
paths that are already in the index. The change serves its
purpose, but introduces a regression because the responsibility
of avoiding unnecessary reindexing by matching the cached stat
is shifted nowhere.
This makes it the job of add_file_to_index() function.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
An earlier commit 366bfcb6 broke git-add by moving read_cache()
call down, because it wanted the directory walking code to grab
paths that are already in the index. The change serves its
purpose, but introduces a regression because the responsibility
of avoiding unnecessary reindexing by matching the cached stat
is shifted nowhere.
This makes it the job of add_file_to_index() function.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
read-cache.c | diff | blob | history |