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