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

Re: [PATCH] ls-files: add %(skipworktree) atom to format option

From
Elijah Newren <newren@gmail.com>
Date
Jan 14, 2023, 03:00 UTC
Message-ID
<CABPp-BFEKqU2YWEk=NT2xA_cO=rj_EgjqzYsuxDGwPon18dq8Q@mail.gmail.com>
In-Reply-To
<CAOLTT8RNWJLA_UvoMA_MktkEmLSjJrx7E6Khy97cHhVFXPQD2A@mail.gmail.com>
On Fri, Jan 13, 2023 at 8:50 AM ZheNing Hu <adlternative@gmail.com> wrote:
Show 6 quoted lines
>
> Elijah Newren <newren@gmail.com> 于2023年1月12日周四 18:00写道:
> >
> > On Wed, Jan 11, 2023 at 7:42 AM ZheNing Hu via GitGitGadget
> > <gitgitgadget@gmail.com> wrote:
> > >
[...]
Show 12 quoted lines
> > The "and removed from working tree" portion of this sentence is
> > superfluous.  (And actually makes it harder to understand, I had to
> > try to think through a bunch of cases to try to figure out why you
> > might be trying to add some extra qualifier.)
> >
>
> I just quoted the definition of SKIP_WORKTREE from
> Documentation/technical/sparse-checkout.txt:
>
>     SKIP_WORKTREE: When tracked files do not match the sparse specification and
>       are removed from the working tree, the file in the index is marked
>       with a SKIP_WORKTREE bit.
Ah, thanks for pointing out the error.  This should probably be reworded to:
SKIP_WORKTREE: When a tracked file which is unmodified does not match
        the sparsity patterns, it is removed from the working tree and
        the file in the index is marked with a SKIP_WORKTREE bit (to
        distinguish the missing file from an unstaged deletion).
[...]
> To be honest, right now I think %(skipworktree) just refines the
> --format option's ability to read the index entry SKIP_WORKTREE
> flag bits. It is probably still worth keeping.

I'm not opposed to the idea of a special skipworktree formatting in conjunction with ls-files' --format option, so long as it has alternate rationale and isn't worded to suggest it supersedes `git ls-files -t` for all sparse-checkout uses.

Previous: ZheNing HuNext: Ævar Arnfjörð Bjarmason
Message 7 of 24 in “ls-files: add %(skipworktree) atom to format option”
  1. ls-files: add %(skipworktree) atom to format optionZheNing Hu via GitGitGadget, Jan 11, 2023
  2. Elijah NewrenJan 12, 2023
  3. Junio C HamanoJan 12, 2023
  4. Elijah NewrenJan 13, 2023
  5. ZheNing HuJan 13, 2023
  6. ZheNing HuJan 13, 2023
  7. Elijah NewrenJan 14, 2023
  8. Ævar Arnfjörð BjarmasonJan 12, 2023
  9. ZheNing HuJan 13, 2023
  10. 0/2 ls-files: add %(skipworktree) atom to format optionZheNing Hu via GitGitGadget, Jan 19, 2023
  11. 1/2 docs: fix sparse-checkout docs linkZheNing Hu via GitGitGadget, Jan 19, 2023
  12. Elijah NewrenJan 20, 2023
  13. Martin ÅgrenJan 20, 2023
  14. ZheNing HuJan 23, 2023
  15. ZheNing HuJan 23, 2023
  16. 2/2 ls-files: add %(skipworktree) atom to format optionZheNing Hu via GitGitGadget, Jan 19, 2023
  17. Elijah NewrenJan 20, 2023
  18. Junio C HamanoJan 20, 2023
  19. ZheNing HuJan 23, 2023
  20. Junio C HamanoJan 23, 2023
  21. ZheNing HuJan 23, 2023
  22. 0/2 ls-files: add %(skipworktree) atom to format optionZheNing Hu via GitGitGadget, Feb 4, 2023
  23. 1/2 docs: fix sparse-checkout docs linkZheNing Hu via GitGitGadget, Feb 4, 2023
  24. 2/2 ls-files: add %(skipworktree) atom to format optionZheNing Hu via GitGitGadget, Feb 4, 2023

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.