diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-09-19 14:05:11 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-19 14:05:11 -0700 |
commit | 92ea1ac8267a14f4eae55f175ac7ff0aeaaddc89 (patch) | |
tree | 7bdf4543e8c2428be6f51b8225d3d3a56fbdae36 /read-cache.c | |
parent | Merge branch 'lf/bundle-exclusion' into maint (diff) | |
parent | read-cache: check for leading symlinks when refreshing index (diff) | |
download | tgif-92ea1ac8267a14f4eae55f175ac7ff0aeaaddc89.tar.xz |
Merge branch 'rs/refresh-beyond-symlink' into maint
* rs/refresh-beyond-symlink:
read-cache: check for leading symlinks when refreshing index
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/read-cache.c b/read-cache.c index 5d3c8bd4aa..6f0057fe66 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1064,6 +1064,14 @@ static struct cache_entry *refresh_cache_ent(struct index_state *istate, return ce; } + if (has_symlink_leading_path(ce->name, ce_namelen(ce))) { + if (ignore_missing) + return ce; + if (err) + *err = ENOENT; + return NULL; + } + if (lstat(ce->name, &st) < 0) { if (ignore_missing && errno == ENOENT) return ce; |