Skip to content

Revisiting cache-tree

Junio C Hamano git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4read-tree A B: do not corrupt cache-treebuiltin-read-tree.c+2 -40 replies
2/4Move prime_cache_tree() to cache-tree.cbuiltin-checkout.c builtin-read-tree.c cache-tree.c +1 more+40 -360 replies
3/4read-tree -m A B: prime cache-tree from the switched-to treebuiltin-read-tree.c+5 -00 replies
4/4checkout branch: prime cache-tree fullybuiltin-checkout.c+8 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Revisiting cache-tree

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(-)