author | Junio C Hamano <junkio@cox.net> | |
Sat, 25 Jun 2005 09:25:29 +0000 (02:25 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Sat, 25 Jun 2005 23:52:16 +0000 (16:52 -0700) | ||
commit | b155725daeec48436d1fcbec4854ffd317408a6e | |
tree | 37c9bb329b890f432e21508bda67ef093cdd8130 | tree | snapshot |
parent | aacc15ec5261fca8a02570f93028e3ac4213caae | commit | diff |
[PATCH] Fix oversimplified optimization for add_cache_entry().
An earlier change to optimize directory-file conflict check
broke what "read-tree --emu23" expects. This is fixed by this
commit.
(1) Introduces an explicit flag to tell add_cache_entry() not to
check for conflicts and use it when reading an existing tree
into an empty stage --- by definition this case can never
introduce such conflicts.
(2) Makes read-cache.c:has_file_name() and read-cache.c:has_dir_name()
aware of the cache stages, and flag conflict only with paths
in the same stage.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
An earlier change to optimize directory-file conflict check
broke what "read-tree --emu23" expects. This is fixed by this
commit.
(1) Introduces an explicit flag to tell add_cache_entry() not to
check for conflicts and use it when reading an existing tree
into an empty stage --- by definition this case can never
introduce such conflicts.
(2) Makes read-cache.c:has_file_name() and read-cache.c:has_dir_name()
aware of the cache stages, and flag conflict only with paths
in the same stage.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
cache.h | diff | blob | history | |
read-cache.c | diff | blob | history | |
t/t1005-read-tree-m-2way-emu23.sh | diff | blob | history | |
tree.c | diff | blob | history |