* lisp/vc/vc-git.el (vc-git-print-log): Restrict file scope to a single file
when vc-git-print-log-follow is non-nil (bug#19045). (vc-git-print-log-follow): Doc fix. * etc/NEWS: Mention 'vc-git-print-log-follow'.
This commit is contained in:
parent
b654791064
commit
c787a49682
2 changed files with 8 additions and 3 deletions
3
etc/NEWS
3
etc/NEWS
|
@ -1169,6 +1169,9 @@ branch-related commands on a keymap bound to 'B'.
|
||||||
*** 'vc-region-history' is now bound to 'C-x v h', replacing the older
|
*** 'vc-region-history' is now bound to 'C-x v h', replacing the older
|
||||||
'vc-insert-headers' binding.
|
'vc-insert-headers' binding.
|
||||||
|
|
||||||
|
*** New user option 'vc-git-print-log-follow' to follow renames in Git logs
|
||||||
|
for a single file.
|
||||||
|
|
||||||
** CC mode
|
** CC mode
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
@ -994,7 +994,7 @@ This prompts for a branch to merge from."
|
||||||
(autoload 'vc-setup-buffer "vc-dispatcher")
|
(autoload 'vc-setup-buffer "vc-dispatcher")
|
||||||
|
|
||||||
(defcustom vc-git-print-log-follow nil
|
(defcustom vc-git-print-log-follow nil
|
||||||
"If true, follow renames in Git logs for files."
|
"If true, follow renames in Git logs for a single file."
|
||||||
:type 'boolean
|
:type 'boolean
|
||||||
:version "26.1")
|
:version "26.1")
|
||||||
|
|
||||||
|
@ -1019,8 +1019,10 @@ If LIMIT is non-nil, show no more than this many entries."
|
||||||
(append
|
(append
|
||||||
'("log" "--no-color")
|
'("log" "--no-color")
|
||||||
(when (and vc-git-print-log-follow
|
(when (and vc-git-print-log-follow
|
||||||
(not (cl-some #'file-directory-p files)))
|
(null (cdr files))
|
||||||
;; "--follow" on directories is broken
|
(car files)
|
||||||
|
(not (file-directory-p (car files))))
|
||||||
|
;; "--follow" on directories or multiple files is broken
|
||||||
;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=8756
|
;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=8756
|
||||||
;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16422
|
;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16422
|
||||||
(list "--follow"))
|
(list "--follow"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue