mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-07 08:00:48 -08:00
Fix vc-annotate-show-log-revision-at-line
* 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.
This commit is contained in:
parent
a6a1c8600f
commit
46a2c191f2
2 changed files with 11 additions and 0 deletions
|
|
@ -545,6 +545,7 @@ Return a cons (REV . FILENAME)."
|
|||
|
||||
(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.
|
||||
|
|
@ -559,6 +560,8 @@ the file in question, search for the log entry required and move point."
|
|||
(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
|
||||
|
|
|
|||
|
|
@ -1147,6 +1147,14 @@ This prompts for a branch to merge from."
|
|||
|
||||
(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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue