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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:37

Matthieu Moy [off-list ref] writes:
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 am no entirely happy with this patch.

If all your scripted Porcelain wants to see is "what are the paths I might
want to run 'git add' on?", you do not want to run diff twice (which is
what "status" does); you would say "ls-files -t -m -o --exclude-standard",
instead. The alternative is not even superiour in this case.

Having said that, I personally don't think of any other combination of
flags with which "ls-files -t" is useful.

If there are parts of the documentation that are misleading, perhaps that
is what your patch should be fixing instead, no?

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

From: Daniel Grace <hidden>
Date: 2016-06-15 22:48:37

On Wed, Apr 14, 2010 at 9:39 AM, Junio C Hamano [off-list ref] wrote:
If all your scripted Porcelain wants to see is "what are the paths I might
want to run 'git add' on?", you do not want to run diff twice (which is
what "status" does); you would say "ls-files -t -m -o --exclude-standard",
instead. The alternative is not even superiour in this case.
Why -m? I have a script that attempts to ask just this question and I
don't use -m. Reading the documentation, I'm not sure why I would. In
what cases would I get wrong information without -m? For the record, I
also don't use -t, though using -t in this case does make sense to me,
I just apparently didn't notice that bit of the documentation when
writing that feature.

Daniel
http://www.doomstick.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help