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

Re: [PATCH v5] repo_read_index: add config to expect files outside sparse patterns

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 2, 2022, 07:36 UTC
Message-ID
<xmqq1qzkolet.fsf@gitster.g>
In-Reply-To
<20220302043301.1620188-1-newren@gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 17 quoted lines
> Typically with sparse checkouts, we expect files outside the sparsity
> patterns to be marked as SKIP_WORKTREE and be missing from the working
> tree.  Sometimes this expectation would be violated however; including
> in cases such as:
>   * users grabbing files from elsewhere and writing them to the worktree
>     (perhaps by editing a cached copy in an editor, copying/renaming, or
>      even untarring)
>   * various git commands having incomplete or no support for the
>     SKIP_WORKTREE bit[1,2]
>   * users attempting to "abort" a sparse-checkout operation with a
>     not-so-early Ctrl+C (updating $GIT_DIR/info/sparse-checkout and the
>     working tree is not atomic)[3].
> When the SKIP_WORKTREE bit in the index did not reflect the presence of
> the file in the working tree, it traditionally caused confusion and was
> difficult to detect and recover from.  So, in a sparse checkout, since
> af6a51875a ("repo_read_index: clear SKIP_WORKTREE bit from files present
> in worktree", 2022-01-06), Git automatically clears the SKIP_WORKTREE
The reference is a bit off here.  Here is what I get locally:
    af6a51875a (repo_read_index: clear SKIP_WORKTREE bit from files
    present in worktree, 2022-01-14)
and that is in the version I have locally in 'next'.
Show 5 quoted lines
> [1] https://lore.kernel.org/git/xmqqbmb1a7ga.fsf@gitster-ct.c.googlers.com/
> [2] The three long paragraphs in the middle of
>     https://lore.kernel.org/git/CABPp-BH9tju7WVm=QZDOvaMDdZbpNXrVWQdN-jmfN8wC6YVhmw@mail.gmail.com/
> [3] https://lore.kernel.org/git/CABPp-BFnFpzwGC11TLoLs8YK5yiisA5D5-fFjXnJsbESVDwZsA@mail.gmail.com/
> [4] such as the vfsd described in

Here is another difference from the version I have locally in 'next', which I didn't notice that this [4] was misspelt as [1] before applying.

Everything else seems the same, so let's not bother reverting the old one out of 'next' and merging this version after fixing this version up. What we have is good enough modulo [4] vs [1].

Thanks.
Previous: Elijah NewrenNext: Elijah Newren
Message 27 of 29 in “Provide config option to expect files outside sparse patterns”
  1. Provide config option to expect files outside sparse patternsElijah Newren via GitGitGadget, Feb 20, 2022
  2. Derrick StoleeFeb 20, 2022
  3. Junio C HamanoFeb 20, 2022
  4. Elijah NewrenFeb 22, 2022
  5. Johannes SchindelinFeb 22, 2022
  6. Derrick StoleeFeb 22, 2022
  7. Johannes SchindelinFeb 21, 2022
  8. Ævar Arnfjörð BjarmasonFeb 21, 2022
  9. Elijah NewrenFeb 22, 2022
  10. Johannes SchindelinFeb 22, 2022
  11. Ævar Arnfjörð BjarmasonFeb 22, 2022
  12. Jonathan NiederFeb 22, 2022
  13. Ævar Arnfjörð BjarmasonFeb 25, 2022
  14. Elijah NewrenFeb 22, 2022
  15. Ævar Arnfjörð BjarmasonFeb 22, 2022
  16. Johannes SchindelinFeb 22, 2022
  17. Derrick StoleeFeb 22, 2022
  18. repo_read_index: add config to expect files outside sparse patternsJonathan Nieder, Feb 23, 2022
  19. Elijah NewrenFeb 23, 2022
  20. repo_read_index: add config to expect files outside sparse patternsElijah Newren, Feb 24, 2022
  21. Junio C HamanoFeb 24, 2022
  22. Elijah NewrenFeb 26, 2022
  23. Jonathan NiederFeb 25, 2022
  24. Elijah NewrenFeb 26, 2022
  25. repo_read_index: add config to expect files outside sparse patternsElijah Newren, Feb 26, 2022
  26. repo_read_index: add config to expect files outside sparse patternsElijah Newren, Mar 2, 2022
  27. Junio C HamanoMar 2, 2022
  28. Elijah NewrenMar 2, 2022
  29. Derrick StoleeMar 2, 2022

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.