summaryrefslogtreecommitdiff
path: root/diffcore.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-06-01 11:38:07 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-01 13:24:03 -0700
commit67574c403f1e27660bbd0348b81b31adc9889b20 (patch)
tree5511c5cab33437edbee94e6fbe5a62d3d5827ae5 /diffcore.h
parent81bb573ed882523e345f0923b88db2aac8f4b93c (diff)
downloadgit-67574c403f1e27660bbd0348b81b31adc9889b20.tar.gz
[PATCH] diff: mode bits fixes
The core GIT repository has trees that record regular file mode in 0664 instead of normalized 0644 pattern. Comparing such a tree with another tree that records the same file in 0644 pattern without content changes with git-diff-tree causes it to feed otherwise unmodified pairs to the diff_change() routine, which triggers a sanity check routine and barfs. This patch fixes the problem, along with the fix to another caller that uses unnormalized mode bits to call diff_change() routine in a similar way. Without this patch, you will see "fatal error" from diff-tree when you run git-deltafy-script on the core GIT repository itself. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'diffcore.h')
-rw-r--r--diffcore.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/diffcore.h b/diffcore.h
index dc0f21db9b..981ee052d7 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -59,10 +59,6 @@ struct diff_filepair {
#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 void diff_free_filepair(struct diff_filepair *);
extern int diff_unmodified_pair(struct diff_filepair *);