From: Nguyen Thai Ngoc Duy Date: Sat, 08 Nov 2008 04:30:37 GMT Subject: Re: [PATCH 1/2] Introduce rename factorization in diffcore. Message-ID: In-Reply-To: <20081030221645.3325.78288.stgit@gandelf.nowhere.earth> On 10/31/08, Yann Dirson wrote: > - else if (detect_rename == DIFF_DETECT_COPY) { > - /* > - * Increment the "rename_used" score by > - * one, to indicate ourselves as a user. > - */ > - p->one->rename_used++; > - register_rename_src(p->one, p->score); > + else { > + if (detect_rename == DIFF_DETECT_COPY) { > + /* > + * Increment the "rename_used" score by > + * one, to indicate ourselves as a user. > + */ > + p->one->rename_used++; > + register_rename_src(p->one, p->score); > + } > + if (DIFF_OPT_TST(options, FACTORIZE_RENAMES)) { > + /* similarly, rename factorization needs to > + * see all files from second tree > + */ > + //p->two->rename_used++; // FIXME: would we need that ? > + locate_rename_dst(p->two, 1); > + } > } > } Hmm.. how about turn on a special flag for these rename_dst items? Otherwise --group-renames and --find-copies-harder combination would become hell: you have to compare all src with all dst. It could exceed rename_limit, therefore no rename detection will be done. -- Duy