GNU bug report logs - #17945
24.4.50; vc-git-annotate-command is too slow

Previous Next

Package: emacs;

Reported by: William Xu <william.xwl <at> gmail.com>

Date: Sat, 5 Jul 2014 12:29:02 UTC

Severity: normal

Found in version 24.4.50

Done: Óscar Fuentes <ofv <at> wanadoo.es>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 17945 <at> debbugs.gnu.org (full text, mbox):

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: 17945 <at> debbugs.gnu.org
Subject: Re: bug#17945: 24.4.50; vc-git-annotate-command is too slow
Date: Tue, 24 Feb 2015 16:31:45 +0100
So what about this patch?

	Modified   lisp/vc/vc-git.el
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index a31c121..07ff083 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -120,6 +120,16 @@ (defcustom vc-git-diff-switches t
   :version "23.1"
   :group 'vc-git)
 
+(defcustom vc-git-annotate-switches t
+  "String or list of strings specifying switches for Git blame under VC.
+If nil, use the value of `vc-annotate-switches'.  If t, use no switches."
+  :type '(choice (const :tag "Unspecified" nil)
+		 (const :tag "None" t)
+		 (string :tag "Argument String")
+		 (repeat :tag "Argument List" :value ("") string))
+  :version "25.1"
+  :group 'vc-git)
+
 (defcustom vc-git-program "git"
   "Name of the Git executable (excluding any arguments)."
   :version "24.1"
@@ -1013,7 +1023,9 @@ (defun vc-git-revision-completion-table (files)
 
 (defun vc-git-annotate-command (file buf &optional rev)
   (let ((name (file-relative-name file)))
-    (vc-git-command buf 'async nil "blame" "--date=iso" "-C" "-C" rev "--" name)))
+    (apply #'vc-git-command buf 'async nil "blame" "--date=iso"
+	   (append (vc-switches 'git 'annotate)
+		   (list rev "--" name)))))
 
 (declare-function vc-annotate-convert-time "vc-annotate" (time))





This bug report was last modified 10 years and 85 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.