Re: Bug Report: git ls-files -d

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




    What did you expect to happen? (Expected behavior)
    git ls-files -d to show deleted files in my repository

    What happened instead? (Actual behavior)
    nothing is shown

Does not reproduce to me.

    $ git reset --hard
    $ git ls-files -s COPYING
    100644 536e55524db72bd2acf175208aef4f3dfc148d42 0	COPYING
    $ ls -1 COPYING
    COPYING
    $ git ls-files -d; echo no output
    no output
    $ rm COPYING
    $ git ls-files -d
    COPYING

Did you remove any file?  "ls-files -d" reports the working tree
files that have been removed that are still known by the index.
So, after all of the above

    $ git rm --cached COPYING
    $ git ls-files -d; echo no output
    no output

is perfectly expected.

Unlike "git ls-files" that checks the working files against what is in
the index, "git status" checks them against both the index and the
HEAD, so after all of the above, it would notice the removal
relative to HEAD:

    $ git status -uno --porcelain
    D  COPYING

HTH.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux