This series consists of a fix meant for maint branch, and two performance fix. The second one is a refactoring of the code to support the latter. I was doing a rather huge import as a multi-step process by doing something like this: $ rm -f $GIT_DIR/index $ git add some ;# this one is huge $ git tag one $(git write-tree) $ git repack -a -d $ rm -f $GIT_DIR/index $ git add other ;# this one is also huge $ git tag two $(git write-tree) $ git repack -a -d $ git read-tree some other $ git tag both $(git write-tree) $ git repack -a -d The binding of two distinct subtrees is done with the read-tree but it wrote out an incorrect index (notice the lack of -m; with -m option the command correctly does a different thing) and resulted in a corrupt tree object. Junio C Hamano (4): read-tree A B: do not corrupt cache-tree Move prime_cache_tree() to cache-tree.c read-tree -m A B: prime cache-tree from the switched-to tree checkout branch: prime cache-tree fully builtin-checkout.c | 10 +++++++++- builtin-read-tree.c | 48 ++++++++---------------------------------------- cache-tree.c | 34 ++++++++++++++++++++++++++++++++++ cache-tree.h | 4 ++++ 4 files changed, 55 insertions(+), 41 deletions(-) -- 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