* lisp/vc/vc-annotate.el (vc-annotate-show-log-revision-at-line):
Stop from being affected by 'vc-git-print-log-follow'.
* lisp/vc/vc-git.el (vc-git-print-log-follow):
Mention caveats in a comment.
(defvar log-view-vc-backend)
(defvar log-view-vc-fileset)
+(defvar vc-git-print-log-follow)
(defun vc-annotate-show-log-revision-at-line ()
"Visit the log of the revision at line.
(message "Cannot extract revision number from the current line")
(let ((backend vc-annotate-backend)
(log-buf (get-buffer "*vc-change-log*"))
+ ;; No need to follow renames: we specify the historical file name.
+ vc-git-print-log-follow
pos)
(if (and
log-buf
(autoload 'vc-setup-buffer "vc-dispatcher")
+;; It's a weird option due to how Git handles '--follow', and it can
+;; hide certain (usually merge) commits in the `vc-print-log' buffers.
+;;
+;; (setq vc-git-log-switches '("-m")) can fix that, but at the cost of
+;; duplicating many merge commits in the log.
+;;
+;; Long explanation here:
+;; https://stackoverflow.com/questions/46487476/git-log-follow-graph-skips-commits
(defcustom vc-git-print-log-follow nil
"If true, follow renames in Git logs for a single file."
:type 'boolean