git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git merge questions

From
Junio C Hamano <junkio@cox.net>
Date
Dec 17, 2005, 03:48 UTC
Message-ID
<7vbqzgbcyv.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0512170056380.11000@wbgn013.biozentrum.uni-wuerzburg.de>
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.

Previous: Junio C Hamano
Message 9 of 9 in “git merge questions”
  1. Don ZickusDec 16, 2005
  2. Junio C HamanoDec 16, 2005
  3. Don ZickusDec 16, 2005
  4. Junio C HamanoDec 16, 2005
  5. Don ZickusDec 16, 2005
  6. Junio C HamanoDec 16, 2005
  7. Johannes SchindelinDec 16, 2005
  8. Junio C HamanoDec 17, 2005
  9. Junio C HamanoDec 17, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.