author | Junio C Hamano <junkio@cox.net> | |
Sun, 23 Apr 2006 23:52:35 +0000 (16:52 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 24 Apr 2006 03:18:57 +0000 (20:18 -0700) | ||
commit | a52139b47e505e74e23a02f5324485e11dfe4ef9 | |
tree | a692d2dd1fea8cdb361caf03e90afec5ab8f72c5 | tree | snapshot |
parent | 749864627c2d3c33bbc56d7ba0b5542af698cc40 | commit | diff |
Update write-tree to use cache-tree.
The updated write-tree reads from $GIT_DIR/index.aux to pick up
subtree objects information, updates the cache-tree with the
index, and updates index.aux file after writing a tree out of
the index file.
Until update-index and other programs that modify the index are
updated to maintain index.aux file, the index.aux file written
by the last write-tree will become stale immediately after they
update the index, which will result in the whole tree
recomputation just like the original write-tree.
The idea is to convert those commands to invalidate cache-tree
whenever they touch the index entries, and write updated
index.aux out. After the index is updated with them, write-tree
will be able to reuse the parts of the cache-tree that have not
been touched.
Signed-off-by: Junio C Hamano <junkio@cox.net>
The updated write-tree reads from $GIT_DIR/index.aux to pick up
subtree objects information, updates the cache-tree with the
index, and updates index.aux file after writing a tree out of
the index file.
Until update-index and other programs that modify the index are
updated to maintain index.aux file, the index.aux file written
by the last write-tree will become stale immediately after they
update the index, which will result in the whole tree
recomputation just like the original write-tree.
The idea is to convert those commands to invalidate cache-tree
whenever they touch the index entries, and write updated
index.aux out. After the index is updated with them, write-tree
will be able to reuse the parts of the cache-tree that have not
been touched.
Signed-off-by: Junio C Hamano <junkio@cox.net>
write-tree.c | diff | blob | history |