git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nguyen Thai Ngoc Duy" <pclouds@gmail.com>
To: "Yann Dirson" <ydirson@altern.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] Introduce rename factorization in diffcore.
Date: Sat, 8 Nov 2008 11:30:37 +0700	[thread overview]
Message-ID: <fcaeb9bf0811072030u272a6732g2450e1854b96ca18@mail.gmail.com> (raw)
In-Reply-To: <20081030221645.3325.78288.stgit@gandelf.nowhere.earth>

On 10/31/08, Yann Dirson <ydirson@altern.org> 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

  parent reply	other threads:[~2008-11-08  4:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30 22:16 [RFC PATCH v2 0/2] Detection of directory renames Yann Dirson
2008-10-30 22:16 ` [PATCH 1/2] Introduce rename factorization in diffcore Yann Dirson
2008-11-07 11:28   ` Baz
2008-11-07 12:55     ` Jakub Narebski
2008-11-08  4:30   ` Nguyen Thai Ngoc Duy [this message]
2008-11-08  4:32     ` Nguyen Thai Ngoc Duy
2008-10-30 22:16 ` [PATCH 2/2] Add testcases for the --factorize-renames diffcore flag Yann Dirson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fcaeb9bf0811072030u272a6732g2450e1854b96ca18@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ydirson@altern.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).