diff options
| author | Dmitry Gutov | 2018-06-28 03:14:56 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2018-06-28 03:14:56 +0300 |
| commit | 93c41ce6aa64b14fc9bd7bdd0d909915a79191cd (patch) | |
| tree | 6eebc3fffc9584c378aa0f10c4596a46dab00e8c | |
| parent | 7ea0873b4f0ceb1ed11c4ab3d692405efc6c79cf (diff) | |
| download | emacs-93c41ce6aa64b14fc9bd7bdd0d909915a79191cd.tar.gz emacs-93c41ce6aa64b14fc9bd7bdd0d909915a79191cd.zip | |
Remove extra process call from vc-git-find-file-hook
* lisp/vc/vc-git.el (vc-git-find-file-hook): Resolve FIXMEs.
| -rw-r--r-- | lisp/vc/vc-git.el | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 56e85378cb3..ad806b38545 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." | |||
| 974 | (defun vc-git-find-file-hook () | 974 | (defun vc-git-find-file-hook () |
| 975 | "Activate `smerge-mode' if there is a conflict." | 975 | "Activate `smerge-mode' if there is a conflict." |
| 976 | (when (and buffer-file-name | 976 | (when (and buffer-file-name |
| 977 | ;; FIXME: | 977 | (eq (vc-state buffer-file-name 'Git) 'conflict) |
| 978 | ;; 1) the net result is to call git twice per file. | ||
| 979 | ;; 2) v-g-c-f is documented to take a directory. | ||
| 980 | ;; https://lists.gnu.org/r/emacs-devel/2014-01/msg01126.html | ||
| 981 | ;; FIXME: vc-git-state can return `conflict' now. | ||
| 982 | (vc-git-conflicted-files buffer-file-name) | ||
| 983 | (save-excursion | 978 | (save-excursion |
| 984 | (goto-char (point-min)) | 979 | (goto-char (point-min)) |
| 985 | (re-search-forward "^<<<<<<< " nil 'noerror))) | 980 | (re-search-forward "^<<<<<<< " nil 'noerror))) |
| 986 | (vc-file-setprop buffer-file-name 'vc-state 'conflict) | ||
| 987 | (smerge-start-session) | 981 | (smerge-start-session) |
| 988 | (when vc-git-resolve-conflicts | 982 | (when vc-git-resolve-conflicts |
| 989 | (add-hook 'after-save-hook 'vc-git-resolve-when-done nil 'local)) | 983 | (add-hook 'after-save-hook 'vc-git-resolve-when-done nil 'local)) |