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

[PATCH v3] Document ls-files -t as semi-obsolete.

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Jul 27, 2010, 21:11 UTC
Message-ID
<1280265073-23037-1-git-send-email-Matthieu.Moy@imag.fr>
In-Reply-To
<vpqaapcy6xq.fsf@bauges.imag.fr>

The behavior of "git ls-files -t" is very misleading (see http://thread.gmane.org/gmane.comp.version-control.git/126516 and http://thread.gmane.org/gmane.comp.version-control.git/144394/focus=144397 for examples of mislead users) and 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.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
Should fix the formatting issue.
Finally, I also added a mention of diff-tree --name-status too.
 Documentation/git-ls-files.txt |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
index 3521637..710e87a 100644
--- a/Documentation/git-ls-files.txt
+++ b/Documentation/git-ls-files.txt
@@ -106,8 +106,16 @@ OPTIONS
 	with `-s` or `-u` options does not make any sense.
 
 -t::
-	Identify the file status with the following tags (followed by
-	a space) at the start of each line:
+	This feature is semi-deprecated. For scripting purpose,
+	linkgit:git-status[1] `--porcelain` and
+	linkgit:git-diff-tree[1] `--name-status` are almost always
+	superior alternatives, and users should look at
+	linkgit:git-status[1] `--short` or linkgit:git-diff[1]
+	`--name-status` for more user-friendly alternatives.
++
+This option identifies the file status with the following tags (followed by
+a space) at the start of each line:
+
 	H::	cached
 	S::	skip-worktree
 	M::	unmerged
-- 
1.7.2.25.g50ec3
Previous: Matthieu MoyNext: Jeff King
Message 5 of 10 in “Document ls-files -t as semi-obsolete.”
  1. Document ls-files -t as semi-obsolete.Matthieu Moy, Jul 26, 2010
  2. Junio C HamanoJul 27, 2010
  3. Michele BallabioJul 27, 2010
  4. Matthieu MoyJul 27, 2010
  5. Document ls-files -t as semi-obsolete.Matthieu Moy, Jul 27, 2010
  6. Jeff KingJul 28, 2010
  7. Document ls-files -t as semi-obsolete.Matthieu Moy, Jul 28, 2010
  8. Jeff KingJul 27, 2010
  9. Matthieu MoyJul 27, 2010
  10. Jeff KingJul 27, 2010

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.