From 1da6175d438a9849db07a68326ee05f291510074 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Thu, 6 May 2010 21:52:28 -0700 Subject: Make diffcore_std only can run once before a diff_flush When file renames/copies detection is turned on, the second diffcore_std will degrade a 'C' pair to a 'R' pair. And this may happen when we run 'git log --follow' with hard copies finding. That is, the try_to_follow_renames() will run diffcore_std to find the copies, and then 'git log' will issue another diffcore_std, which will reduce 'src->rename_used' and recognize this copy as a rename. This is not what we want. So, I think we really don't need to run diffcore_std more than one time. Signed-off-by: Bo Yang Signed-off-by: Junio C Hamano --- diffcore.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'diffcore.h') diff --git a/diffcore.h b/diffcore.h index 5d05deaf68..491bea0b44 100644 --- a/diffcore.h +++ b/diffcore.h @@ -91,11 +91,13 @@ struct diff_queue_struct { struct diff_filepair **queue; int alloc; int nr; + int run; }; #define DIFF_QUEUE_CLEAR(q) \ do { \ (q)->queue = NULL; \ (q)->nr = (q)->alloc = 0; \ + (q)->run = 0; \ } while(0); extern struct diff_queue_struct diff_queued_diff; -- cgit v1.2.1