From 96716a197658e069557e7615ce2019107d72225e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 25 May 2005 15:07:08 -0700 Subject: [PATCH] Fix type-change handling when assigning the status code to filepairs. The interim single-liner '?' fix resulted delete entries that should not have emitted coming out in the output as an unintended side effect; I caught this with the "rename" test in the test suite. This patch instead fixes the code that assigns the status code to each filepair. I verified this does not break the testcase in udev.git tree Kay Sievers gave us, by running git-diff-tree on that tree which showed 21 file to symlink changes. Signed-off-by: Junio C Hamano Signed-off-by: Linus Torvalds --- diffcore.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'diffcore.h') diff --git a/diffcore.h b/diffcore.h index 4610168251..092eecce23 100644 --- a/diffcore.h +++ b/diffcore.h @@ -45,6 +45,9 @@ struct diff_filepair { #define DIFF_PAIR_UNMERGED(p) \ (!DIFF_FILE_VALID((p)->one) && !DIFF_FILE_VALID((p)->two)) +#define DIFF_PAIR_TYPE_CHANGED(p) \ + ((S_IFMT & (p)->one->mode) != (S_IFMT & (p)->two->mode)) + extern int diff_unmodified_pair(struct diff_filepair *); struct diff_queue_struct { -- cgit v1.2.3