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

Re: [BUG] fatal error during merge

From
Alex Riesen <raa.lkml@gmail.com>
Date
May 11, 2009, 07:39 UTC
Message-ID
<81b0412b0905110039l280b69acje4f9704c81028bcc@mail.gmail.com>
In-Reply-To
<alpine.DEB.1.00.0905110106370.27348@pacific.mpi-cbg.de>
2009/5/11 Johannes Schindelin <Johannes.Schindelin@gmx.de>:
>
> If I read the message right, the file revision is supposed not to be
> changed from HEAD.  Is unpack_trees() invalidating the "cleanness" of that
> file?

I think it is the D/F (or F/D?) conflict. A file in one branch is renamed into a directory. The script in the original post still works (err... fails).

>  (I would really love to have a better idea what's going on than
> what I get from both the commit message and the patch before giving my
> ACK.)

Ah, scrap that. The patch is no good, and does not fix the original problem at all. In fact, it makes it even worse - hides the problem by removing conflict information from the index and _deletes_ the problematic file. That's why it wasn't included - the brokenness was noticed. Pity that then I run out of time, too.

The script to reproduce (note GIT_EXEC_PATH!):
#!/bin/sh

rm -rf merge-rename-fail mkdir merge-rename-fail || exit cd merge-rename-fail || exit export GIT_MERGE_VERBOSITY=5 export GIT_EXEC_PATH=$HOME/projects/git $GIT_EXEC_PATH/git init mkdir before echo FILE >before/one echo FILE >after $GIT_EXEC_PATH/git add . $GIT_EXEC_PATH/git commit -mfirst

rm -f after $GIT_EXEC_PATH/git mv before after $GIT_EXEC_PATH/git commit -mmove

$GIT_EXEC_PATH/git checkout -b para HEAD^ echo COMPLETELY ANOTHER FILE >another $GIT_EXEC_PATH/git add . $GIT_EXEC_PATH/git commit -mpara

echo '*** *** MERGE *** ***' echo export GIT_EXEC_PATH=$GIT_EXEC_PATH echo $GIT_EXEC_PATH/git merge master

Previous: Johannes SchindelinNext: Anders Melchiorsen
Message 3 of 5 in “Re: [BUG] fatal error during merge”
  1. Alex RiesenMay 10, 2009
  2. Johannes SchindelinMay 10, 2009
  3. Alex RiesenMay 11, 2009
  4. Anders MelchiorsenMay 11, 2009
  5. Johannes SchindelinMay 11, 2009

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.