diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 22:26:31 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 22:26:31 -0700 |
commit | e44794706eeb57f2ee38ed1604821aa38b8ad9d2 (patch) | |
tree | c49cd3e4f1dfe4ccbf2b8d00188beaa251fee028 /cache.h | |
parent | [PATCH] Do not run useless show-diff on unmerged paths repeatedly. (diff) | |
download | tgif-e44794706eeb57f2ee38ed1604821aa38b8ad9d2.tar.xz |
Be much more liberal about the file mode bits.
We only really care about the difference between a file being executable
or not (by its owner). Everything else we leave for the user umask to
decide.
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -72,6 +72,9 @@ struct cache_entry { #define ce_size(ce) cache_entry_size(ce_namelen(ce)) #define ce_stage(ce) ((CE_STAGEMASK & ntohs((ce)->ce_flags)) >> CE_STAGESHIFT) +#define ce_permissions(mode) (((mode) & 0100) ? 0755 : 0644) +#define create_ce_mode(mode) htonl(S_IFREG | ce_permissions(mode)) + #define cache_entry_size(len) ((offsetof(struct cache_entry,name) + (len) + 8) & ~7) const char *sha1_file_directory; |