X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=diffcore.h;h=ee1955bf384d83e0c168844e5eefc83a2f993fb9;hb=fbe082a528861af785be15bb37d1c7d8f574daa4;hp=092eecce231c6596ac70f98655cfa4f4419d9990;hpb=96716a197658e069557e7615ce2019107d72225e;p=git.git diff --git a/diffcore.h b/diffcore.h index 092eecce..ee1955bf 100644 --- a/diffcore.h +++ b/diffcore.h @@ -48,6 +48,12 @@ struct diff_filepair { #define DIFF_PAIR_TYPE_CHANGED(p) \ ((S_IFMT & (p)->one->mode) != (S_IFMT & (p)->two->mode)) +#define DIFF_PAIR_MODE_CHANGED(p) ((p)->one->mode != (p)->two->mode) + +#define DIFF_FILE_CANON_MODE(mode) \ + (S_ISREG(mode) ? (S_IFREG | ce_permissions(mode)) : \ + S_ISLNK(mode) ? S_IFLNK : S_IFDIR) + extern int diff_unmodified_pair(struct diff_filepair *); struct diff_queue_struct {