GNU bug report logs - #21559
25.0.50; auto-revert-mode breaks git rebase

Previous Next

Package: emacs;

Reported by: Ben Gamari <ben <at> smart-cactus.org>

Date: Fri, 25 Sep 2015 14:31:02 UTC

Severity: normal

Found in version 25.0.50

Fixed in version 27.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #74 received at 21559 <at> debbugs.gnu.org (full text, mbox):

From: Jason Merrill <jason.merrill <at> gmail.com>
To: 21559 <at> debbugs.gnu.org
Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase
Date: Fri, 9 Sep 2016 16:56:23 -0400
[Message part 1 (text/plain, inline)]
The problematic invocation of git status comes from

(defun vc-git-conflicted-files (directory)
  "Return the list of files with conflicts in DIRECTORY."
  (let* ((status
          (vc-git--run-command-string directory "status" "--porcelain"
"--"))

I'm working around this issue by changing vc-git-conflicted-files to use
diff-files --name-status, which doesn't lock the index:

(defun vc-git-conflicted-files (directory)
  "Return the list of files with conflicts in DIRECTORY."
  (let* ((status
          (vc-git--run-command-string directory "diff-files"
"--name-status"))
         (lines (when status (split-string status "\n" 'omit-nulls)))
         files)
    ;; TODO: Look into reimplementing `vc-git-state', as well as

    ;; `vc-git-dir-status-files', based on this output, thus making the

    ;; extra process call in `vc-git-find-file-hook' unnecessary.

    (dolist (line lines files)
      (when (string-match "\\([ MADRCU?!]\\)[ \t]+\\(.+\\)" line)
        (let ((state (match-string 1 line))
              (file (match-string 2 line)))
          ;; See git-status(1).

          (when (equal state "U")
            (push (expand-file-name file directory) files)))))))
[Message part 2 (text/html, inline)]

This bug report was last modified 6 years and 293 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.