Re: [PATCH 1/2] Introduce rename factorization in diffcore.
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Nov 8, 2008, 04:30 UTC
- Message-ID
- <fcaeb9bf0811072030u272a6732g2450e1854b96ca18@mail.gmail.com>
- In-Reply-To
- <20081030221645.3325.78288.stgit@gandelf.nowhere.earth>
On 10/31/08, Yann Dirson <ydirson@altern.org> wrote:
Show 25 quoted lines
> - 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