[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: possible 'git cp'/how does git detect copies
From:       "=?ISO-8859-1?Q?Santi_B=E9jar?=" <sbejar () gmail ! com>
Date:       2008-06-27 12:57:13
Message-ID: 8aa486160806270557w20ce622co1099bceec7bc90f9 () mail ! gmail ! com
[Download RAW message or body]

On Fri, Jun 27, 2008 at 14:40, Mircea Bardac <dev@mircea.bardac.net> wrote:
> I was looking today at duplicating a file but, I soon realized that there is
> no 'git cp' command (this was the "deductive approach to git commands",
> starting from git mv/rm/...). How does "git diff -C" detect copies (-C is
> used for this, according to the documentation)?

Did you followed the "See also −−find−copies−harder."?

From the man page

--find-copies-harder::
        For performance reasons, by default, `-C` option finds copies only
        if the original file of the copy was modified in the same
        changeset.  This flag makes the command
        inspect unmodified files as candidates for the source of
        copy.  This is a very expensive operation for large
        projects, so use it with caution.  Giving more than one
        `-C` option has the same effect.


>
> On a very simple test, I couldn't see this working. I just copied one file,
> added it, committed the change, ran "git diff -C HEAD^!". There is no place
> saying that it's contents is copied from some other file (both files are in
> the repository now).
>
> "git blame -C new_copied_file" also doesn't show the commits for the
> original file.

git blame -C -C new_copied_file
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic