aboutsummaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/diff.h b/diff.h
index 0f1ed5877..3fcf7010e 100644
--- a/diff.h
+++ b/diff.h
@@ -4,6 +4,10 @@
#ifndef DIFF_H
#define DIFF_H
+#define DIFF_FILE_CANON_MODE(mode) \
+ (S_ISREG(mode) ? (S_IFREG | ce_permissions(mode)) : \
+ S_ISLNK(mode) ? S_IFLNK : S_IFDIR)
+
extern void diff_addremove(int addremove,
unsigned mode,
const unsigned char *sha1,