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

Re: [PATCH] merge-recursive: mark rename/delete conflict as unmerged

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 23, 2008, 16:20 UTC
Message-ID
<alpine.DEB.1.00.0812231716000.30769@pacific.mpi-cbg.de>
In-Reply-To
<7v7i5rhkix.fsf@gitster.siamese.dyndns.org>
Hi,
On Mon, 22 Dec 2008, Junio C Hamano wrote:
Show 8 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > When a file was renamed in one branch, but deleted in the other, one 
> > should expect the index to contain an unmerged entry, namely the 
> > target of the rename.  Make it so.
> 
> That was quick, but the surrounding code makes me wonder if other
> if/elseif branches also need similar handling.

I tried to make sure that the surrounding code also adds unmerged entries, but I have to admit that my focus lay with the bug report at hand.

Show 5 quoted lines
> For example, rename/add comes up with a new name that does not exist 
> anywhere, and adds both to the index; it is understandable that you need 
> to do this when processing a merge with non-zero depth because you need 
> to have a tree as the result, but shouldn't the final zero depth merge 
> just use the original names and leave the results in higher stages?

Hmm. I think this is a different issue (if you mean the issue that the result might be named differently than expected).

As for the unmerged entries, no, I do not think we need to do anything else besides calling update_file() and set try_merge = 1.

After all, if a file was renamed in one branch, but added directly in another, does it need to conflict? I'd say no.

Ciao, Dscho

Previous: Junio C Hamano
Message 5 of 5 in “Move-delete merge conflict is not displayed using git ls-files --unmerged”
  1. Constantine PlotnikovDec 22, 2008
  2. Junio C HamanoDec 22, 2008
  3. merge-recursive: mark rename/delete conflict as unmergedJohannes Schindelin, Dec 22, 2008
  4. Junio C HamanoDec 22, 2008
  5. Johannes SchindelinDec 23, 2008

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.