Variable: vc-git-print-log-follow

vc-git-print-log-follow is a customizable variable defined in vc-git.el.gz.

Value

nil

Documentation

If non-nil, use the flag --follow when producing single file logs.

A non-nil value will make the printed log automatically follow the file renames. The downsides is that the log produced this way may omit certain (merge) commits, and that log-view-diff fails on commits that used the previous name, in that log buffer.

When this variable is nil, and the log ends with a rename, there is a button which you can press to show the log for the file name before the rename.

This variable was added, or its default value changed, in Emacs 26.1.

Probably introduced at or before Emacs version 26.1.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc-git.el.gz
;; 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 non-nil, use the flag `--follow' when producing single file logs.

A non-nil value will make the printed log automatically follow
the file renames.  The downsides is that the log produced this
way may omit certain (merge) commits, and that `log-view-diff'
fails on commits that used the previous name, in that log buffer.

When this variable is nil, and the log ends with a rename, there is a
button which you can press to show the log for the file name before the
rename."
  :type 'boolean
  :version "26.1")