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

Re: [PATCH v2] Document ls-files -t as semi-obsolete.

From
Jeff King <peff@peff.net>
Date
Jul 27, 2010, 19:58 UTC
Message-ID
<20100727195832.GA11717@coredump.intra.peff.net>
In-Reply-To
<1280162391-18701-1-git-send-email-Matthieu.Moy@imag.fr>
On Mon, Jul 26, 2010 at 06:39:51PM +0200, Matthieu Moy wrote:
Show 5 quoted lines
> 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.
I agree with the goal, but one nit:
Show 6 quoted lines
>  -t::
> +	This feature is semi-deprecated. For scripting purpose,
> +	linkgit:git-status[1] `--porcelain` is almost always a
> +	superior alternative, and users should look at
> +	linkgit:git-status[1] `--short` or linkgit:git-diff[1]
> +	`--name-status` for more user-friendly alternatives.

Isn't "git diff-files --name-status" the closest plumbing analogue? Git status actually does a lot of extra work.

Also, while testing this, I got confused. Does "ls-files -t" even work, or am I totally misunderstanding it? I tried:

  mkdir repo && cd repo && git init &&
  echo content >file1 &&
  echo content >file2 &&
  git add . &&
  git commit -m one &&
  echo content >>file1 &&
  echo content >>file2 &&
  git add file1 &&
  git ls-files -t
which yields:
  H file1
  H file2

Shouldn't one of them be marked "C"hanged (I think file2, but that was what I was double-checking)?

-Peff
Previous: Matthieu MoyNext: Matthieu Moy
Message 8 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.