Function: vc-git-find-file-hook
vc-git-find-file-hook is a byte-compiled function defined in
vc-git.el.gz.
Signature
(vc-git-find-file-hook)
Documentation
Activate smerge-mode(var)/smerge-mode(fun) if there is a conflict.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-git.el.gz
(defun vc-git-find-file-hook ()
"Activate `smerge-mode' if there is a conflict."
(when (and buffer-file-name
(eq (vc-state buffer-file-name 'Git) 'conflict)
(save-excursion
(goto-char (point-min))
(re-search-forward "^<<<<<<< " nil 'noerror)))
(smerge-start-session)
(when vc-git-resolve-conflicts
(add-hook 'after-save-hook #'vc-git-resolve-when-done nil 'local))
(vc-message-unresolved-conflicts buffer-file-name)))