--- Begin Message ---
Subject: |
Re: bug#26066: 26.0.50; vc-git-status gives wrong result |
Date: |
Tue, 14 Mar 2017 20:25:57 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
The actual problem is with the function vc-git--empty-db-p, which acts
in the directory default-directory (implicitly, through vc-git--call and
then process-file). Thus, I think replacing (in vc-git-state)
(vc-git--empty-db-p)
with
(let ((default-directory (file-name-directory file)))
(vc-git--empty-db-p))
should resolve the issue without side effect.
As an aside, is there a reason that vc-git-status does not use "git
status -z --porcelain --ignored"? It seems more natural/straightfoward
and it would also deal with ignored and removed files. It could also
work with directories, which the current function doesn't.
--- End Message ---