GNU bug report logs -
#1386
23.0.60; vc-git-diff: diff switches can't be customized
Previous Next
Reported by: Magnus Henoch <mange <at> freemail.hu>
Date: Thu, 20 Nov 2008 01:00:03 UTC
Severity: normal
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1386 in the body.
You can then email your comments to 1386 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Message #3 received at quiet <at> emacsbugs.donarmstrong.com (full text, mbox):
[ edited resend from
http://lists.gnu.org/archive/html/emacs-devel/2008-06/msg00018.html ]
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
I opened etc/spook.lines in the Emacs Git tree, typed C-x v l, put point
on one revision and typed d to see the diff. The result was just:
Binary files a/etc/spook.lines and b/etc/spook.lines differ
I then added "-a" to vc-diff-switches, but this had no effect.
I then found that vc-git-diff doesn't obey _any_ of diff-switches,
vc-diff-switches and vc-git-diff-switches, though the docstring of
vc-diff-switches implies that it would.
In GNU Emacs 23.0.60.1 (powerpc-unknown-netbsd4.99.42, X toolkit, Xaw3d scroll bars)
of 2008-05-29 on zemdatav
Windowing system distributor `The X.Org Foundation', version 11.0.10300000
configured using `configure '--with-x-toolkit=athena' '--enable-maintainer-mod' '--without-rsvg''
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1386
; Package
emacs
.
Full text and
rfc822 format available.
Message #6 received at 1386 <at> emacsbugs.donarmstrong.com (full text, mbox):
Magnus Henoch wrote:
> I then found that vc-git-diff doesn't obey _any_ of diff-switches,
> vc-diff-switches and vc-git-diff-switches, though the docstring of
> vc-diff-switches implies that it would.
Sorry for the long delay. Please try this patch.
*** vc-git.el 27 Oct 2008 07:21:47 -0000 1.74
--- vc-git.el 21 Nov 2008 19:32:55 -0000
***************
*** 109,114 ****
--- 109,127 ----
(require 'vc-dir)
(require 'grep))
+ (defcustom vc-git-diff-switches t
+ "String or list of strings specifying extra switches for Git diff under VC.
+ If nil, use the value of `vc-diff-switches'.
+ If you want to force an empty list of arguments, use t."
+ :type '(choice (const :tag "Unspecified" nil)
+ (const :tag "None" t)
+ (string :tag "Argument String")
+ (repeat :tag "Argument List"
+ :value ("")
+ string))
+ :version "23.1"
+ :group 'vc)
+
(defvar git-commits-coding-system 'utf-8
"Default coding system for git commits.")
***************
*** 501,512 ****
(beginning-of-line))
(defun vc-git-diff (files &optional rev1 rev2 buffer)
! (let ((buf (or buffer "*vc-diff*")))
! (if (and rev1 rev2)
! (vc-git-command buf 1 files "diff-tree" "--exit-code" "-p"
! rev1 rev2 "--")
! (vc-git-command buf 1 files "diff-index" "--exit-code" "-p"
! (or rev1 "HEAD") "--"))))
(defun vc-git-revision-table (files)
;; What about `files'?!? --Stef
--- 514,525 ----
(beginning-of-line))
(defun vc-git-diff (files &optional rev1 rev2 buffer)
! "Get a difference report using Git between two revisions of FILES."
! (apply #'vc-git-command (or buffer "*vc-diff*") 1 files
! (if (and rev1 rev2) "diff-tree" "diff-index")
! "--exit-code"
! (append (vc-switches (if vc-git-diff-switches 'git) 'diff)
! (list "-p" (or rev1 "HEAD") rev2 "--"))))
(defun vc-git-revision-table (files)
;; What about `files'?!? --Stef
Reply sent to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
Full text and
rfc822 format available.
Notification sent to
Magnus Henoch <mange <at> freemail.hu>
:
bug acknowledged by developer.
Full text and
rfc822 format available.
Message #11 received at 1386-done <at> emacsbugs.donarmstrong.com (full text, mbox):
2008-11-26 Glenn Morris <rgm <at> gnu.org>
* vc-git.el (vc-git-diff-switches): New option.
(vc-git-diff): Apply diff switches. (Bug#1386)
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Fri, 16 Jan 2009 15:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 201 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.