Skip to content

projectile-dir-files-alien returning deleted but unstaged files from git #1897

@wyuenho

Description

@wyuenho

git ls-files does not have the ability to remove deleted but unstaged files from the result, but does have the ability to only show deleted but unstaged files. projectile-dir-files-alien and projectile-get-sub-projects-files need to remove deleted but unstaged files before returning the result.

Steps to reproduce the problem

  1. Make sure fd is not in PATH
  2. git init repo
  3. cd repo
  4. echo "hello world" > greeting.txt
  5. git commit -m "greeting" greeting.txt
  6. rm greeting.txt
  7. M-x eval-expression RET (projectile-dir-files (projectile-project-root)) -> ("greeting.txt")

Expectation:

nil should be returned

Environment & Version information

git version 2.45.2

Projectile version information

Projectile 20240212.1100

Emacs version

29.4

Operating system

macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions