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

Re: [PATCH v2] cache-tree: do not lazy-fetch merge tree

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 9, 2019, 21:05 UTC
Message-ID
<xmqqef0pi3im.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<xmqqsgp5i6s1.fsf@gitster-ct.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 8 quoted lines
> Isn't that what is going on?  I thought I dug up the original that
> introduced the has_object_file() call to this codepath to make sure
> we understand why we make the check (and I expected the person who
> is proposing this change to do the same and record the finding in
> the proposed log message).
>
> I am running out of time today, and will revisit later this week
> (I'll be down for at least two days starting tomorrow, by the way).
Here is what I came up with.
    The cache-tree datastructure is used to speed up the comparison
    between the HEAD and the index, and when the index is updated by
    a cherry-pick (for example), a tree object that would represent
    the paths in the index in a directory is constructed in-core, to
    see if such a tree object exists already in the object store.
    When the lazy-fetch mechanism was introduced, we converted this
    "does the tree exist?" check into an "if it does not, and if we
    lazily cloned, see if the remote has it" call by mistake.  Since
    the whole point of this check is to repair the cache-tree by
    recording an already existing tree object opportunistically, we
    shouldn't even try to fetch one from the remote.
    Pass the OBJECT_INFO_SKIP_FETCH_OBJECT flag to make sure we only
    check for existence in the local object store without triggering the
    lazy fetch mechanism.
Previous: Junio C HamanoNext: Jeff King
Message 7 of 12 in “cache-tree: do not lazy-fetch merge tree”
  1. cache-tree: do not lazy-fetch merge treeJonathan Tan, Sep 3, 2019
  2. Derrick StoleeSep 4, 2019
  3. Jonathan TanSep 4, 2019
  4. Junio C HamanoSep 4, 2019
  5. cache-tree: do not lazy-fetch merge treeJonathan Tan, Sep 9, 2019
  6. Junio C HamanoSep 9, 2019
  7. Junio C HamanoSep 9, 2019
  8. Jeff KingSep 9, 2019
  9. Junio C HamanoSep 10, 2019
  10. Jonathan TanSep 10, 2019
  11. SZEDER GáborSep 10, 2019
  12. Jonathan TanSep 10, 2019

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.