summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-07-30 03:22:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-07-30 03:24:28 (GMT)
commitb6986d8a75812a003a1623e0f0dff93c4a026b44 (patch)
tree310d937efb0c261707bd5577f696270c9b1d068f /cache.h
parent77716755cbdf970fa0814a5f77c884b1f17693de (diff)
downloadgit-b6986d8a75812a003a1623e0f0dff93c4a026b44.zip
git-b6986d8a75812a003a1623e0f0dff93c4a026b44.tar.gz
git-b6986d8a75812a003a1623e0f0dff93c4a026b44.tar.bz2
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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index e6c7f33..9222774 100644
--- a/cache.h
+++ b/cache.h
@@ -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 */