diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-29 20:22:25 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-07-29 20:24:28 -0700 |
commit | b6986d8a75812a003a1623e0f0dff93c4a026b44 (patch) | |
tree | 310d937efb0c261707bd5577f696270c9b1d068f /cache.h | |
parent | 77716755cbdf970fa0814a5f77c884b1f17693de (diff) | |
download | git-b6986d8a75812a003a1623e0f0dff93c4a026b44.tar.gz git-b6986d8a75812a003a1623e0f0dff93c4a026b44.tar.xz |
git-checkout: be careful about untracked symlinks
This fixes the case where an untracked symlink that points at a directory
with tracked paths confuses the checkout logic, demostrated in t6035.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -468,6 +468,9 @@ extern int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_obje extern int index_path(unsigned char *sha1, const char *path, struct stat *st, int write_object); extern void fill_stat_cache_info(struct cache_entry *ce, struct stat *st); +/* "careful lstat()" */ +extern int check_path(const char *path, int len, struct stat *st); + #define REFRESH_REALLY 0x0001 /* ignore_valid */ #define REFRESH_UNMERGED 0x0002 /* allow unmerged */ #define REFRESH_QUIET 0x0004 /* be quiet about it */ |