Merge branch 'kb/lstat-cache'
* kb/lstat-cache: lstat_cache(): introduce clear_lstat_cache() function lstat_cache(): introduce invalidate_lstat_cache() function lstat_cache(): introduce has_dirs_only_path() function lstat_cache(): introduce has_symlink_or_noent_leading_path() function lstat_cache(): more cache effective symlink/directory detection
This commit is contained in:
@ -61,7 +61,7 @@ static void unlink_entry(struct cache_entry *ce)
|
||||
char *cp, *prev;
|
||||
char *name = ce->name;
|
||||
|
||||
if (has_symlink_leading_path(ce_namelen(ce), ce->name))
|
||||
if (has_symlink_or_noent_leading_path(ce_namelen(ce), ce->name))
|
||||
return;
|
||||
if (unlink(name))
|
||||
return;
|
||||
@ -580,7 +580,7 @@ static int verify_absent(struct cache_entry *ce, const char *action,
|
||||
if (o->index_only || o->reset || !o->update)
|
||||
return 0;
|
||||
|
||||
if (has_symlink_leading_path(ce_namelen(ce), ce->name))
|
||||
if (has_symlink_or_noent_leading_path(ce_namelen(ce), ce->name))
|
||||
return 0;
|
||||
|
||||
if (!lstat(ce->name, &st)) {
|
||||
|
Reference in New Issue
Block a user