bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#26066: 26.0.50; vc-git-status gives wrong result


From: npostavs
Subject: bug#26066: 26.0.50; vc-git-status gives wrong result
Date: Wed, 15 Mar 2017 20:42:54 -0400

[Please use Reply All to keep address@hidden on Cc]

--- 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 ---

Let-binding default-directory sounds okay.

Regarding 'status -z --porcelain', I think it might not have been
available at the time te code was written.  I'm not sure how far back we
need to maintain compatibility.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]