Thread (5 messages) 5 messages, 4 authors, 2016-06-15

Re: ls-files -t broken? Or do I just not understand it?

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:47:16

Björn Steinbrink [off-list ref] writes:
Hi,

ls-files -t seems to always show status H, even if the file was modified
or deleted, and thus gets shown by -m and -d respectively.
That's not exactly "always", but I don't know whether it's the desired
behavior:

/tmp/git$ git st
# On branch master
# Changed but not updated:
#   (use "git add/rm <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   modified
#       deleted:    removed
#
no changes added to commit (use "git add" and/or "git commit -a")
/tmp/git$ git ls-files -t 
H modified
H removed
H unmodified
/tmp/git$ git ls-files -t -m
C modified
C removed
/tmp/git$ git ls-files -t -d
R removed
$ git ls-files -t -d -m
C modified
R removed
C removed

So, you get the C and R flags only when you request explicitely -m and
-d.

I'd say this is a bug, and anyway a testcase should be added to
explicitly state what the behavior should be.

-- 
Matthieu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help