{"thread":{"id":"56592","subject":"Bug Report: git ls-files -d","startedAt":"2021-09-27T13:36:39Z","lastAt":"2021-09-27T21:21:50Z","messageCount":2,"participants":["Calvin Taylor","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"437146","messageId":"CAP9BFHVdg_BWZ2wvdv8t-mN3WKjW4fA+v2181WRYQGsrgmvKmA@mail.gmail.com","threadId":"56592","inReplyTo":null,"subject":"Bug Report: git ls-files -d","fromName":"Calvin Taylor","fromEmail":"coolcatt@gmail.com","sentAt":"2021-09-27T13:36:24Z","receivedAt":"2021-09-27T13:36:39Z","isPatch":false,"sender":{"key":"coolcatt@gmail.com","avatar":null},"body":"-- \n\nCalvin Taylor\n506 260-2866\n\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n have macos and I have some commands possibly remapped like gsed, gfind to sed, find\n\nWhat did you expect to happen? (Expected behavior)\ngit ls-files -d to show deleted files in my repository\n\nWhat happened instead? (Actual behavior)\nnothing is shown, I enabled GIT_TRACE=1, and started bash incase oh-my-zsh might have been interfereing, and got similar results\n\n$ git ls-files -d\n09:42:47.692880 exec-cmd.c:139          trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/bin/git\n09:42:47.693591 exec-cmd.c:238          trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/bin\n09:42:47.695053 git.c:444               trace: built-in: git ls-files -d\n09:42:47.764089 exec-cmd.c:139          trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/bin/git\n09:42:47.764921 exec-cmd.c:238          trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/bin\n09:42:47.765919 git.c:444               trace: built-in: git config --get oh-my-zsh.hide-dirty\n\nWhat's different between what you expected and what actually happened?\nI have several directories I'd like to delete temporarily so I can simplify and study build processes\n\nAnything else you want to add:\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.30.1 (Apple Git-130)\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Darwin 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64\ncompiler info: clang: 12.0.5 (clang-1205.0.22.6)\nlibc info: no libc information available\n$SHELL (typically, interactive shell): /bin/zsh\n\n\n[Enabled Hooks]\n"},{"id":"437193","messageId":"xmqqtui5ogt3.fsf@gitster.g","threadId":"56592","inReplyTo":"CAP9BFHVdg_BWZ2wvdv8t-mN3WKjW4fA+v2181WRYQGsrgmvKmA@mail.gmail.com","subject":"Re: Bug Report: git ls-files -d","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-09-27T21:21:44Z","receivedAt":"2021-09-27T21:21:50Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\n\n    What did you expect to happen? (Expected behavior)\n    git ls-files -d to show deleted files in my repository\n\n    What happened instead? (Actual behavior)\n    nothing is shown\n\nDoes not reproduce to me.\n\n    $ git reset --hard\n    $ git ls-files -s COPYING\n    100644 536e55524db72bd2acf175208aef4f3dfc148d42 0\tCOPYING\n    $ ls -1 COPYING\n    COPYING\n    $ git ls-files -d; echo no output\n    no output\n    $ rm COPYING\n    $ git ls-files -d\n    COPYING\n\nDid you remove any file?  \"ls-files -d\" reports the working tree\nfiles that have been removed that are still known by the index.\nSo, after all of the above\n\n    $ git rm --cached COPYING\n    $ git ls-files -d; echo no output\n    no output\n\nis perfectly expected.\n\nUnlike \"git ls-files\" that checks the working files against what is in\nthe index, \"git status\" checks them against both the index and the\nHEAD, so after all of the above, it would notice the removal\nrelative to HEAD:\n\n    $ git status -uno --porcelain\n    D  COPYING\n\nHTH.\n"}]}