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

[BUG] fatal error during merge

From
AMAnders Melchiorsen <mail@cup.kalibalik.dk>
Date
Nov 13, 2008, 09:22 UTC
Message-ID
<53328.bFoQE3daRhY=.1226568134.squirrel@webmail.hotelhot.dk>

It took a while to make a minimal test case for this, but I think that all the below steps are required. It ends up with this message:

after/one: unmerged (e69de29bb2d1d6434b8b29ae775ad8c2e48c5391) fatal: git write-tree failed to write a tree

and the file that was moved has disappeared from the working tree.

I have tested the script with Git 1.6.0.2, but the real scenario that made this appear seems to also fail with master and next from git.git.

Cheers, Anders.

Test script:

mkdir am-merge-fail cd am-merge-fail git init

mkdir before touch before/one after git add -A git commit -minitial

rm -f after git mv before after git commit -mmove

git checkout -b parallel HEAD~ touch another git add -A git commit -mparallel

git merge master
Next: Samuel Tardieu
Message 1 of 14 in “[BUG] fatal error during merge”
  1. Anders MelchiorsenNov 13, 2008
  2. Samuel TardieuNov 13, 2008
  3. SZEDER GáborNov 13, 2008
  4. Anders MelchiorsenNov 13, 2008
  5. Samuel TardieuNov 13, 2008
  6. SZEDER GáborNov 13, 2008
  7. Anders MelchiorsenNov 13, 2008
  8. SZEDER GáborNov 13, 2008
  9. Anders MelchiorsenNov 13, 2008
  10. Alex RiesenNov 13, 2008
  11. Anders MelchiorsenNov 13, 2008
  12. Junio C HamanoNov 14, 2008
  13. Alex RiesenNov 14, 2008
  14. Anders MelchiorsenNov 14, 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.