Here is a tentative fix on top of Miklos's two patches, even though I won't take them as-is until the test scripts are cleaned up. t/t7605-merge-resolve.sh | 4 +++- unpack-trees.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletions(-) diff --git c/t/t7605-merge-resolve.sh w/t/t7605-merge-resolve.sh index ee21a10..be21ded 100755 --- c/t/t7605-merge-resolve.sh +++ w/t/t7605-merge-resolve.sh @@ -36,7 +36,9 @@ test_expect_success 'merge c1 to c2' ' git diff --exit-code && test -f c0.c && test -f c1.c && - test -f c2.c + test -f c2.c && + test 3 = $(git ls-tree -r HEAD | wc -l) && + test 2 = $(git ls-files | wc -l) ' test_expect_success 'merge c2 to c3 (fails)' ' diff --git c/unpack-trees.c w/unpack-trees.c index cba0aca..016fd46 100644 --- c/unpack-trees.c +++ w/unpack-trees.c @@ -378,6 +378,8 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options memset(&o->result, 0, sizeof(o->result)); if (o->src_index) o->result.timestamp = o->src_index->timestamp; + if (o->dst_index) + o->result.alloc = xmalloc(1); o->merge_size = len; if (!dfc) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html