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, 01:32 UTC
Message-ID
<7vd5jwcxtk.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. You could then provide git with some 
> extra information a la .git/info/grafts: "Even if you, git, do not believe 
> it: this file *was* renamed from blah to blop".

Yeah, except small details such as: where does it record it, and how does the information presented to the user, and how does the user tell git that information should be used?

What would be interesting would be to extend on this thing I just wrote:

    Something like:
        $ git resolve-renamed-path arch/ppc64/ arch/powerpc/
    to mean "I want the result of this merge to rename ppc64/Kconfig
    to powerpc/Kconfig", perhaps?

I think this would work very nicely even without rename detectino by the recursive strategy. What would happen with resolve strategy is that unchanged paths are removed from arch/ppc64 and added to arch/powerpc by the usual read-tree merge rules, and all paths (not just unrecognizable renames -- because resolve would not even try) that have been changed on the "test" branch would be in stage1+stage3 state in arch/ppc64, while the corresponding ones in arch/powerpc are collapsed ("only added in test2 branch") to stage0. The fictional resolve-renamed-path command (notice that I removed the explicit "Kconfig" from the sample command line) could go through the index file, looking for paths that arch/powerpc/ has stage0 and arch/ppc64 has stage1+3, and perform the renaming merge at that point.

Previous: Johannes SchindelinNext: Junio C Hamano
Message 8 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.