After hitting a situation when, after setting the text message of the commit 'fossil' looked hanged at 100% of cpu, procmon showed that it was trying to open files with a name that looked like all files in the manifest in a row. gdb luckily helped us distinguish the point of trouble.

I'll attach a patch that solves the situation but I don't know if the patch has undesired side effects, because I have not tried to understand deeply the code around.

It is about a blob that should be always 'trimmed' before appending. And the 'trimming' is inside an if() branch that our commit looks like not traversing. But I don't know why not, if it should, or whatever. The case is that it does not go through the branch. So, I put the append out.