From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=C3=93scar?= Fuentes Newsgroups: gmane.emacs.bugs Subject: bug#17945: 24.4.50; vc-git-annotate-command is too slow Date: Tue, 24 Feb 2015 16:31:45 +0100 Message-ID: <87oaojuxzy.fsf@wanadoo.es> References: <8638egylnn.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1424792030 1867 80.91.229.3 (24 Feb 2015 15:33:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Feb 2015 15:33:50 +0000 (UTC) To: 17945@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 24 16:33:39 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YQHUR-0008Gd-0F for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Feb 2015 16:33:39 +0100 Original-Received: from localhost ([::1]:49854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQHUQ-0008Jp-Ak for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Feb 2015 10:33:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQHTu-0007WP-UY for bug-gnu-emacs@gnu.org; Tue, 24 Feb 2015 10:33:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQHTq-0005xQ-Kk for bug-gnu-emacs@gnu.org; Tue, 24 Feb 2015 10:33:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQHTq-0005xM-IQ for bug-gnu-emacs@gnu.org; Tue, 24 Feb 2015 10:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YQHTq-0003CH-Cj for bug-gnu-emacs@gnu.org; Tue, 24 Feb 2015 10:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=C3=93scar?= Fuentes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Feb 2015 15:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17945 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17945-submit@debbugs.gnu.org id=B17945.142479192512225 (code B ref 17945); Tue, 24 Feb 2015 15:33:02 +0000 Original-Received: (at 17945) by debbugs.gnu.org; 24 Feb 2015 15:32:05 +0000 Original-Received: from localhost ([127.0.0.1]:56894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQHSq-0003Am-Mi for submit@debbugs.gnu.org; Tue, 24 Feb 2015 10:32:05 -0500 Original-Received: from smtp11.acens.net ([86.109.99.135]:54983 helo=smtp.movistar.es) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQHSj-0003AT-Pz for 17945@debbugs.gnu.org; Tue, 24 Feb 2015 10:31:58 -0500 Original-Received: from qcore (88.10.128.129) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 54615F2D034FE752 for 17945@debbugs.gnu.org; Tue, 24 Feb 2015 15:31:47 +0000 In-Reply-To: (Glenn Morris's message of "Tue, 24 Feb 2015 02:39:36 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99764 Archived-At: 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))