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

Re: [PATCH] cache-tree: populate cache-tree on successful merge

From
David Turner <dturner@twopensource.com>
Date
Jul 28, 2015, 20:28 UTC
Message-ID
<1438115304.18134.33.camel@twopensource.com>
In-Reply-To
<xmqq1tfsdp60.fsf@gitster.dls.corp.google.com>
On Tue, 2015-07-28 at 13:04 -0700, Junio C Hamano wrote:
Show 15 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> 
> > David Turner <dturner@twopensource.com> writes:
> >
> >> The work done to produce the cache-tree is work that the commit would
> >> otherwise have to do.  So we're spending extra time in one place to
> >> eliminate that work in a different place.
> >
> > Good point.  Thanks.
> 
> Hmm, I forgot about another codepath.  What about operations that
> are purely done to pouplate the index, without necessarily creating
> a tree out of the index?
> 
> The most worrisome is "git checkout $branch" (two-tree merge).

Git checkout $branch already populates the cache-tree; this is due to patches I added last year:

commit aecf567cbfb6ab46e82f7f5df36fb6a2dd5bee69
Author: David Turner <dturner@twopensource.com>
Date:   Sat Jul 5 21:06:56 2014 -0700
    cache-tree: create/update cache-tree on checkout
    
    When git checkout checks out a branch, create or update the
    cache-tree so that subsequent operations are faster.
----

Admittedly, we do not test for the case where we must do a two-way merge during a checkout, but I just tested that case, and it appears that we do already populate the cache-tree in that case.

Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 10 in “cache-tree: populate cache-tree on successful merge”
  1. cache-tree: populate cache-tree on successful mergeDavid Turner, Jul 28, 2015
  2. Junio C HamanoJul 28, 2015
  3. David TurnerJul 28, 2015
  4. Junio C HamanoJul 28, 2015
  5. Junio C HamanoJul 28, 2015
  6. David TurnerJul 28, 2015
  7. Junio C HamanoJul 28, 2015
  8. Junio C HamanoJul 28, 2015
  9. David TurnerJul 28, 2015
  10. Junio C HamanoJul 28, 2015

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.