git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marco Costalba" <mcostalba@gmail.com>
To: "Junio C Hamano" <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [RFC] Enable 'check for copy and renames' (-C) also when path filtering
Date: Wed, 16 Aug 2006 22:49:17 +0200	[thread overview]
Message-ID: <e5bfff550608161349t29a678ccl4b211cb570a1217d@mail.gmail.com> (raw)
In-Reply-To: <7v8xlo4lht.fsf@assigned-by-dhcp.cox.net>

On 8/16/06, Junio C Hamano <junkio@cox.net> wrote:
> "Marco Costalba" <mcostalba@gmail.com> writes:
>
> > It seems that -C option of git-diff-tree it works only if the whole
> > changeset is retrieved.
>
> Correct (sort of).  Pathspec works on the input side not on the
> output side.  It's been specified and worked that way from the
> beginning (check the list archive to see me arguing that it
> would be easier to use on the output side, and Linus vetoing
> because following a single file is not that interesting and the
> cost outweighs the benefit of that uninteresting case).
>
> Always feeding the whole tree is wasteful, but if we are
> interested in following a single file, we could do something
> like:
>
>  - follow that file and that file only from the recent to past;
>
>  - notice when that file disappears -- that is the point the
>    file was created.  it may have created from scratch, it may
>    have been renamed or copied.
>
>  - on that commit that creates the file, look at the whole tree
>    to see if we can find an origin.
>
>  - if we find that the file was created by renaming or copying
>    another, keep following that other file from that point on.
>

Yes, I was thinking about something like this, Thanks for point me out
this, now I am quite sure it's the correct way to go ;-)

   Marco

P.S: The first thing will be to teach qgit about renames and copies,
i.e. diff-tree with -C option. I'm cooking a patch on this.

BTW, regarding copies, there are only 6 (6973dca, 8752d11, 927a503,
2276aa6, ddafa7e9 and 7ef7692) in git tree, against 181 renames.

  reply	other threads:[~2006-08-16 20:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-16  9:06 [RFC] Enable 'check for copy and renames' (-C) also when path filtering Marco Costalba
2006-08-16 17:51 ` Junio C Hamano
2006-08-16 20:49   ` Marco Costalba [this message]
2006-08-16 21:11     ` Junio C Hamano

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=e5bfff550608161349t29a678ccl4b211cb570a1217d@mail.gmail.com \
    --to=mcostalba@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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).