Commit 93c41ce6 authored by Dmitry Gutov's avatar Dmitry Gutov

Remove extra process call from vc-git-find-file-hook

* lisp/vc/vc-git.el (vc-git-find-file-hook): Resolve FIXMEs.
parent 7ea0873b
......@@ -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
;; 1) the net result is to call git twice per file.
;; 2) v-g-c-f is documented to take a directory.
;; FIXME: vc-git-state can return `conflict' now.
(vc-git-conflicted-files buffer-file-name)
(eq (vc-state buffer-file-name 'Git) 'conflict)
(goto-char (point-min))
(re-search-forward "^<<<<<<< " nil 'noerror)))
(vc-file-setprop buffer-file-name 'vc-state 'conflict)
(when vc-git-resolve-conflicts
(add-hook 'after-save-hook 'vc-git-resolve-when-done nil 'local))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment