Do simple in-index merge with diff+apply instead of read-tree
authorKarl Hasselström <kha@treskal.com>
Wed, 23 Jul 2008 21:29:09 +0000 (23:29 +0200)
committerKarl Hasselström <kha@treskal.com>
Thu, 24 Jul 2008 22:03:14 +0000 (00:03 +0200)
commitbc1ecd0bb28c457634ea5ea747c55945d1aa1997
tree8b77fc26a3503505c31e45c44fadaa4c5021e220
parent29d9a26459c438f4be500022f993b0496d8cbbd8
Do simple in-index merge with diff+apply instead of read-tree

The advantage is that patch application will resolve some file content
conflicts for us, so that we'll fall back to merge-recursive less
often. This is a significant speedup, especially since merge-recursive
needs to touch the worktree, which means we have to check out the
index first.

(A simple test, pushing 250 patches in a 32k-file repository, with one
file-level merge necessary per push, went from 1.07 to 0.36 seconds
per patch with this patch applied.)

Signed-off-by: Karl Hasselström <kha@treskal.com>
stgit/lib/git.py