From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.60; Suggestion for vc-git.el: allow me to specify options to vc-git Date: Sun, 03 Feb 2008 05:07:21 +0100 Message-ID: <87ir16r8cm.fsf@ambire.localdomain> References: <87sl0auajo.fsf@offby1.atm01.sea.blarg.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202013090 23665 80.91.229.12 (3 Feb 2008 04:31:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Feb 2008 04:31:30 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org To: Eric Hanchrow Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 03 05:31:50 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JLWWB-0007YV-Lb for ged-emacs-devel@m.gmane.org; Sun, 03 Feb 2008 05:31:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JLWVj-0003K2-Na for ged-emacs-devel@m.gmane.org; Sat, 02 Feb 2008 23:31:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JLWVe-0003JJ-KX for emacs-devel@gnu.org; Sat, 02 Feb 2008 23:31:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JLWVd-0003IW-4t for emacs-devel@gnu.org; Sat, 02 Feb 2008 23:31:14 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JLWVd-0003IT-23 for emacs-devel@gnu.org; Sat, 02 Feb 2008 23:31:13 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JLWVc-000260-Tm for emacs-devel@gnu.org; Sat, 02 Feb 2008 23:31:12 -0500 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JLWVc-0003zA-Ik for emacs-pretest-bug@gnu.org; Sat, 02 Feb 2008 23:31:12 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JLWVZ-00025Q-Gq for emacs-pretest-bug@gnu.org; Sat, 02 Feb 2008 23:31:12 -0500 Original-Received: from ppp-43-34.21-151.libero.it ([151.21.34.43] helo=ambire.localdomain) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JLWVZ-00025E-10 for emacs-pretest-bug@gnu.org; Sat, 02 Feb 2008 23:31:09 -0500 Original-Received: from ttn by ambire.localdomain with local (Exim 4.63) (envelope-from ) id 1JLW8X-0005D3-KB; Sun, 03 Feb 2008 05:07:21 +0100 In-Reply-To: <87sl0auajo.fsf@offby1.atm01.sea.blarg.net> (Eric Hanchrow's message of "Sat, 02 Feb 2008 16:51:39 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-Greylist: delayed 1308 seconds by postgrey-1.27 at monty-python; Sat, 02 Feb 2008 23:31:08 EST X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:88075 gmane.emacs.pretest.bugs:20860 Archived-At: () Eric Hanchrow () Sat, 02 Feb 2008 16:51:39 -0800 So: if there isn't already some way I can customize Emacs to do this, could you add such a way? (I still haven't figured out if there's a way to simply tell "git" to always pass the --ignore-space-change option to the diff-tree command). Below is a revised vc-git-diff from: http://www.gnuvola.org/wip/ (see vc-git-hacking) I use it in together w/ the ~/.emacs form: (setq vc-git-diff-switches "--stat") Please try it out and let me know how/where it breaks. You will probably want to use something like: (setq vc-git-diff-switches '("--stat" "--ignore-space-change")) If we can get it to behave in many cases, i will install it. thi _____________________________________________________________ (defun vc-git-diff (files &optional rev1 rev2 buffer) "Backend to `vc-diff' for Git. This respects `vc-git-diff-switches'." (let ((twop (and rev1 rev2))) (apply 'vc-git-command (or buffer "*vc-diff*") 1 files (if twop "diff-tree" "diff-index") `(,@(vc-switches 'git 'diff) "--exit-code" "-p" ,@(if twop (list rev1 rev2) (list (or rev1 "HEAD"))) "--"))))