[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 c787a49: * lisp/vc/vc-git.el (vc-git-print-log):
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] emacs-26 c787a49: * lisp/vc/vc-git.el (vc-git-print-log): Restrict file scope to a single file |
Date: |
Sun, 4 Feb 2018 16:58:43 -0500 (EST) |
branch: emacs-26
commit c787a4968273027960a20ced6d63bae0d1ffa87e
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>
* 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'.
---
etc/NEWS | 3 +++
lisp/vc/vc-git.el | 8 +++++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 02385d2..00ff9cd 100644
--- a/etc/NEWS
+++ b/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-insert-headers' binding.
+*** New user option 'vc-git-print-log-follow' to follow renames in Git logs
+for a single file.
+
** CC mode
---
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 3bf837c..40aa0b2 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -994,7 +994,7 @@ This prompts for a branch to merge from."
(autoload 'vc-setup-buffer "vc-dispatcher")
(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
:version "26.1")
@@ -1019,8 +1019,10 @@ If LIMIT is non-nil, show no more than this many
entries."
(append
'("log" "--no-color")
(when (and vc-git-print-log-follow
- (not (cl-some #'file-directory-p files)))
- ;; "--follow" on directories is broken
+ (null (cdr files))
+ (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=16422
(list "--follow"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 c787a49: * lisp/vc/vc-git.el (vc-git-print-log): Restrict file scope to a single file,
Juri Linkov <=