summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-03-04 17:31:09 -0800
committerJunio C Hamano <junkio@cox.net>2007-03-04 17:31:09 -0800
commite6f95113431f7e69263bc3d075c0a7715ce587e3 (patch)
tree810569356f64b58df52560fcce0d3cfb561014ab /cache.h
parent784b11cd05e7862b0fbcc1251a65669c7004a8df (diff)
parenta249a9b5a26e841a28f6e993a560d749303cf91c (diff)
downloadgit-e6f95113431f7e69263bc3d075c0a7715ce587e3.tar.gz
Merge branch 'js/symlink'
* js/symlink: Tell multi-parent diff about core.symlinks. Handle core.symlinks=false case in merge-recursive. Add core.symlinks to mark filesystems that do not support symbolic links.
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 8018b2cd3b..c291163e6d 100644
--- a/cache.h
+++ b/cache.h
@@ -108,7 +108,10 @@ static inline unsigned int create_ce_mode(unsigned int mode)
}
static inline unsigned int ce_mode_from_stat(struct cache_entry *ce, unsigned int mode)
{
- extern int trust_executable_bit;
+ extern int trust_executable_bit, has_symlinks;
+ if (!has_symlinks && S_ISREG(mode) &&
+ ce && S_ISLNK(ntohl(ce->ce_mode)))
+ return ce->ce_mode;
if (!trust_executable_bit && S_ISREG(mode)) {
if (ce && S_ISREG(ntohl(ce->ce_mode)))
return ce->ce_mode;
@@ -215,6 +218,7 @@ extern int delete_ref(const char *, unsigned char *sha1);
/* Environment bits from configuration mechanism */
extern int use_legacy_headers;
extern int trust_executable_bit;
+extern int has_symlinks;
extern int assume_unchanged;
extern int prefer_symlink_refs;
extern int log_all_ref_updates;