git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/4] Revisiting cache-tree

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 20, 2009, 10:58 UTC
Message-ID
<1240225100-29960-1-git-send-email-gitster@pobox.com>

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(-)
Next: Junio C Hamano
Message 1 of 6 in “Revisiting cache-tree”
  1. 0/4 Revisiting cache-treeJunio C Hamano, Apr 20, 2009
  2. 1/4 read-tree A B: do not corrupt cache-treeJunio C Hamano, Apr 20, 2009
  3. 2/4 Move prime_cache_tree() to cache-tree.cJunio C Hamano, Apr 20, 2009
  4. 3/4 read-tree -m A B: prime cache-tree from the switched-to treeJunio C Hamano, Apr 20, 2009
  5. 4/4 checkout branch: prime cache-tree fullyJunio C Hamano, Apr 20, 2009
  6. Alex RiesenApr 20, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.