[Top][All Lists]

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

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

From: Jonathan Ganc
Subject: bug#26066: 26.0.50; vc-git-status gives wrong result
Date: Wed, 15 Mar 2017 22:40:40 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

First of all, I realized that the let binding needs to surround the entire vc-git-state function, not just (vc-git--empty-db-p) (because vc-git--run-command-string, vc-git--call have the same issue with default-directory). E.g., change

(let ((diff (vc-git--run-command-string
               file "diff-index" "-p" "--raw" "-z" "HEAD" "--")))


(let* ((default-directory (file-name-directory file))
       (diff (vc-git--run-command-string
             file "diff-index" "-p" "--raw" "-z" "HEAD" "--")))

But yes, I will work on an improved version using git status and try incorporate/improve on vc-git-conflicted-files.

(My ultimate goal is to try to get something like atom's status for git files into emacs, which is how I noticed the problem to begin with).

On 03/15/2017 08:48 PM, Dmitry Gutov wrote:
On 16.03.2017 02:42, address@hidden wrote:
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.

Like mentioned in a discussion on a different bug, we'll accept a patch like that. You can even reuse some code from `vc-git-conflicted-files`.

reply via email to

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