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

[PATCH 0/4] clarify ls-files docs

From
Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
Date
Jan 13, 2023, 04:41 UTC
Message-ID
<pull.1463.git.1673584914.gitgitgadget@gmail.com>

"git ls-files -t" was marked as semi-deprecated back in 5bc0e247c4 ("Document ls-files -t as semi-obsolete.", 2010-07-28); quoting that commit message:

    git ls-files -t" is [...] badly documented, hence we point the
    users to superior alternatives.
    The feature is marked as "semi-obsolete" but not "scheduled for removal"
    since it's a plumbing command, scripts might use it, and Git testsuite
    already uses it to test the state of the index.

Looking over the manual, "git ls-files -t" is very easy to misunderstand...as are several things besides the "-t" option within that manual page. I recall a number of discussions over the years on the mailing list about various confusing aspects of ls-files, and I think a number of those misunderstandings could have been avoided with a few small clarifications. This series sets about to do that, as well as remove the "semi-deprecated" notice on git ls-files -t. That particular command is rather integral to sparse-checkout usage (and doesn't seem to confuse in that case), and I think the improvements avoid the original problems. However, I have kept the comments about git status --porcelain and such being likely better candidates for a number of things that git ls-files -t might have historically been used for.

Series spurred by https://lore.kernel.org/git/CABPp-BGsD=6PiJtnsuYPsiZJ1rm2X8yTeu-YeP4q5uu5UDw2og@mail.gmail.com/

Elijah Newren (4):
  ls-files: add missing documentation for --resolve-undo option
  ls-files: clarify descriptions of file selection options
  ls-files: clarify descriptions of status tags for -t
  ls-files: guide folks to --exclude-standard over other --exclude*
    options
 Documentation/git-ls-files.txt | 79 ++++++++++++++++++++++------------
 1 file changed, 52 insertions(+), 27 deletions(-)
base-commit: 2b4f5a4e4bb102ac8d967cea653ed753b608193c
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1463%2Fnewren%2Fls-files-docs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1463/newren/ls-files-docs-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1463
-- 
gitgitgadget
Next: Elijah Newren via GitGitGadget
Message 1 of 12 in “clarify ls-files docs”
  1. 0/4 clarify ls-files docsElijah Newren via GitGitGadget, Jan 13, 2023
  2. 2/4 ls-files: clarify descriptions of file selection optionsElijah Newren via GitGitGadget, Jan 13, 2023
  3. ZheNing HuJan 14, 2023
  4. Elijah NewrenJan 14, 2023
  5. ZheNing HuJan 16, 2023
  6. 1/4 ls-files: add missing documentation for --resolve-undo optionElijah Newren via GitGitGadget, Jan 13, 2023
  7. ZheNing HuJan 14, 2023
  8. 3/4 ls-files: clarify descriptions of status tags for -tElijah Newren via GitGitGadget, Jan 13, 2023
  9. ZheNing HuJan 14, 2023
  10. Elijah NewrenJan 14, 2023
  11. ZheNing HuJan 16, 2023
  12. 4/4 ls-files: guide folks to --exclude-standard over other --exclude* optionsElijah Newren via GitGitGadget, Jan 13, 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.