Re: git merge questions

From: Junio C Hamano <junkio@cox.net>
Date: 2005-12-17 14:48:40
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> just a thought: maybe in this case -- git fails to recognize a rename -- 
> Pasky's idea would have some merit.

It is not as simple as that.  If you look at the output of the
following command, you would understand why.

	$ git rev-list ^$(git merge-base test test2) test2 -- \
          arch/powerpc/Kconfig arch/ppc64/Kconfig |
          git diff-tree --pretty -C -r --stdin --abbrev --name-status \
          arch/powerpc/Kconfig arch/ppc64/Kconfig

The transition happened over time with multiple commits.

First ppc64/Kconfig was somewhat stripped of its contents,
starting at this commit:

    diff-tree bcdd1ea... (from 5bfc826...)
    Author: Stephen Rothwell <sfr@canb.auug.org.au>
    Date:   Mon Sep 19 23:13:24 2005 +1000

        [PATCH] powerpc: Move arch/ppc*/oprofile/Kconfig to arch/powerpc

        These files are identical.

        Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
        Signed-off-by: Paul Mackerras <paulus@samba.org>

    M       arch/ppc64/Kconfig

and after a lot of hard work, powerpc/Kconfig gets
created.

    diff-tree 14cf11a... (from e5baa39...)
    Author: Paul Mackerras <paulus@samba.org>
    Date:   Mon Sep 26 16:04:21 2005 +1000

        powerpc: Merge enough to start building in arch/powerpc.

        This creates the directory structure under arch/powerpc and a bunch
        of Kconfig files...

    A       arch/powerpc/Kconfig

After that both continues to exist for some time, and finally
ppc64/Kconfig gets deleted with this one:

    diff-tree 7568cb4... (from c55377e...)
    Author: Paul Mackerras <paulus@samba.org>
    Date:   Mon Nov 14 17:30:17 2005 +1100

        powerpc: Move most remaining ppc64 files over to arch/powerpc

        Also deletes files in arch/ppc64 that are no longer used now that
        we don't compile with ARCH=ppc64 any more.

        Signed-off-by: Paul Mackerras <paulus@samba.org>

    M       arch/powerpc/Kconfig
    D       arch/ppc64/Kconfig


You cannot record "this is the rename" by attributing that
information to one particular commit.  Even looking at the
commit history one by one you cannot really say powerpc/Kconfig
is a rename of ppc64/Kconfig.  I suspect that it is not really a
rename --- from reading of the log messages, its original
contents were moved around and scattered over to other Kconfig
files in the tree, or along with other configuration pieces got
consolidated into powerpc/Kconfig, or perhaps both.


-
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
Received on Sat Dec 17 14:50:03 2005

This archive was generated by hypermail 2.1.8 : 2005-12-17 14:50:10 EST