emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-26 93c41ce 3/3: Remove extra process call from vc-gi


From: Dmitry Gutov
Subject: [Emacs-diffs] emacs-26 93c41ce 3/3: Remove extra process call from vc-git-find-file-hook
Date: Wed, 27 Jun 2018 20:20:32 -0400 (EDT)

branch: emacs-26
commit 93c41ce6aa64b14fc9bd7bdd0d909915a79191cd
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Remove extra process call from vc-git-find-file-hook
    
    * lisp/vc/vc-git.el (vc-git-find-file-hook): Resolve FIXMEs.
---
 lisp/vc/vc-git.el | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 56e8537..ad806b3 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -974,16 +974,10 @@ This prompts for a branch to merge from."
 (defun vc-git-find-file-hook ()
   "Activate `smerge-mode' if there is a conflict."
   (when (and buffer-file-name
-             ;; FIXME:
-             ;; 1) the net result is to call git twice per file.
-             ;; 2) v-g-c-f is documented to take a directory.
-             ;; https://lists.gnu.org/r/emacs-devel/2014-01/msg01126.html
-             ;; FIXME: vc-git-state can return `conflict' now.
-             (vc-git-conflicted-files buffer-file-name)
+             (eq (vc-state buffer-file-name 'Git) 'conflict)
              (save-excursion
                (goto-char (point-min))
                (re-search-forward "^<<<<<<< " nil 'noerror)))
-    (vc-file-setprop buffer-file-name 'vc-state 'conflict)
     (smerge-start-session)
     (when vc-git-resolve-conflicts
       (add-hook 'after-save-hook 'vc-git-resolve-when-done nil 'local))



reply via email to

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