X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=cache.h;h=f6c590959853f88a2184cbfe433ad9b88a621546;hb=596524b33d50e47e2375cec9e00aff59f0e8278b;hp=255e6b5cc7aa799eee892dcd3632cd0656e6dd1e;hpb=8ff8eea016f27d22d0264b140843470c7f14e004;p=git.git diff --git a/cache.h b/cache.h index 255e6b5c..f6c59095 100644 --- 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)); } +#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) @@ -246,6 +249,7 @@ extern void *read_object_with_reference(const unsigned char *sha1, unsigned char *sha1_ret); const char *show_date(unsigned long time, int timezone); +const char *show_rfc2822_date(unsigned long time, int timezone); int parse_date(const char *date, char *buf, int bufsize); void datestamp(char *buf, int bufsize); unsigned long approxidate(const char *);