Function: projectile-git-changed-files
projectile-git-changed-files is a byte-compiled function defined in
projectile.el.
Signature
(projectile-git-changed-files ROOT &optional BASE)
Documentation
Return the files changed in the project at ROOT, relative to it.
Without BASE that is the working tree: everything staged, unstaged or untracked. With BASE - a branch, tag or any other revision - it is everything that differs from it, plus the files not yet tracked at all, which is what "show me what this branch changed" usually means.
Only git is supported; any other version control system returns nil.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-git-changed-files (root &optional base)
"Return the files changed in the project at ROOT, relative to it.
Without BASE that is the working tree: everything staged, unstaged or
untracked. With BASE - a branch, tag or any other revision - it is
everything that differs from it, plus the files not yet tracked at all,
which is what \"show me what this branch changed\" usually means.
Only git is supported; any other version control system returns nil."
(when (eq (projectile-project-vcs root) 'git)
(when-let* ((toplevel (projectile--git-toplevel root)))
(let ((paths
(if base
(append
(when-let* ((diff (projectile--git root "diff" "--name-only"
"-z" base)))
(split-string diff "\0" t))
(when-let* ((new (projectile--git root "ls-files" "-z"
"--others" "--exclude-standard")))
(split-string new "\0" t)))
(projectile--git-status-changed-files root))))
(seq-uniq (projectile--git-relativize paths root toplevel))))))