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

Re: [PATCH] unpack-trees: also allow get_progress() to work on a different index

From
Junio C Hamano <gitster@pobox.com>
Date
May 15, 2020, 15:01 UTC
Message-ID
<xmqq8shtnsy1.fsf@gitster.c.googlers.com>
In-Reply-To
<CABPp-BFAR=+CxwcZz1v4n3Z53uEas5P6Y7pUT7u9dAL0hULe3w@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 25 quoted lines
> On Thu, May 14, 2020 at 3:17 PM Junio C Hamano <gitster@pobox.com> wrote:
>>
>> Elijah Newren <newren@gmail.com> writes:
>>
>> >> Do we see these CE_UPDATE|CE_WT_REMOVE bits attached to the cache
>> >> entries in the o->src_index array when get_progress() is fed the
>> >> src_index in the first place?
>> >
>> > Yes, before calling check_updates(o, o->src_index), update_sparsity()
>> > loops over o->src_index and calls apply_sparse_checkout() on each of
>> > the non-conflicted cache entries.  apply_sparse_checkout() will set
>> > either CE_UPDATE or CE_WT_REMOVE whenever items flip from or to having
>> > the SKIP_WORKTREE bit set.
>>
>> Hmph.
>>
>> I thought that the whole point of splitting o->result from
>> o->src_index we did long time ago was to allow us to treat
>> o->src_index constant.  I hope we haven't broken anything by
>> starting to do things like that X-<.
>
> I think we're safe there.  No function started modifying o->src_index
> directly; they just modify the index they are passed in.  The only
> place that passes o->src_index to functions for modification is
> update_sparsity(), which unpack_trees() never calls.
OK.  Thanks for an additional detail.  Let's merge it down by -rc1.
Previous: Elijah Newren
Message 6 of 6 in “unpack-trees: also allow get_progress() to work on a different index”
  1. unpack-trees: also allow get_progress() to work on a different indexElijah Newren via GitGitGadget, May 14, 2020
  2. Junio C HamanoMay 14, 2020
  3. Elijah NewrenMay 14, 2020
  4. Junio C HamanoMay 14, 2020
  5. Elijah NewrenMay 14, 2020
  6. Junio C HamanoMay 15, 2020

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.