projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
GIT 1.3.0-rc2
[git.git]
/
cache.h
diff --git
a/cache.h
b/cache.h
index
255e6b5
..
69801b0
100644
(file)
--- a/
cache.h
+++ b/
cache.h
@@
-106,6
+106,9
@@
static inline unsigned int create_ce_mode(unsigned int mode)
return htonl(S_IFLNK);
return htonl(S_IFREG | ce_permissions(mode));
}
return htonl(S_IFLNK);
return htonl(S_IFREG | ce_permissions(mode));
}
+#define canon_mode(mode) \
+ (S_ISREG(mode) ? (S_IFREG | ce_permissions(mode)) : \
+ S_ISLNK(mode) ? S_IFLNK : S_IFDIR)
#define cache_entry_size(len) ((offsetof(struct cache_entry,name) + (len) + 8) & ~7)
#define cache_entry_size(len) ((offsetof(struct cache_entry,name) + (len) + 8) & ~7)