threads / discuss / 18970

fatal error when merging a rename

Subject: fatal error when merging a rename

## tl;dr

One message between Apr 20, 2009 and Apr 20, 2009.

replies: 0people: 1as markdown or json

Anders Melchiorsen· Apr 20, 2009, 15:36 UTC · lore
The talk of merge corner cases made me remember this issue:
http://thread.gmane.org/gmane.comp.version-control.git/100859/focus=100956
The merge in the script below fails with this message:
fatal: git write-tree failed to write a tree

which is fixed by the (unapplied) patch from Alex in the thread above, but the worktree is still not updated even with that patch.

Cheers, Anders.

#!/bin/bash
GIT=$(which git)

cd $(mktemp -d am-merge-fail.XXXXXXX) $GIT init

mkdir before yes | head -n100 >before/100 touch after $GIT add before/100 after $GIT commit -minitial

$GIT branch parallel

$GIT rm before/100 after mkdir after yes | head -n99 >after/99 $GIT add after/99 $GIT commit -mmove

$GIT checkout parallel echo "Just to cause a non-ff" >other $GIT add other $GIT commit -mparallel

$GIT merge master

← back to recent threads