unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1386: 23.0.60; vc-git-diff: diff switches can't be customized
       [not found] ` <df3ahn43rb.fsf@fencepost.gnu.org>
@ 2008-11-21 19:37   ` Glenn Morris
  2008-11-26  3:05   ` bug#1386: marked as done (23.0.60; vc-git-diff: diff switches can't be customized) Emacs bug Tracking System
  1 sibling, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2008-11-21 19:37 UTC (permalink / raw)
  To: Magnus Henoch; +Cc: 1386


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






^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#1386: marked as done (23.0.60; vc-git-diff: diff switches  can't be customized)
       [not found] ` <df3ahn43rb.fsf@fencepost.gnu.org>
  2008-11-21 19:37   ` bug#1386: 23.0.60; vc-git-diff: diff switches can't be customized Glenn Morris
@ 2008-11-26  3:05   ` Emacs bug Tracking System
  1 sibling, 0 replies; 2+ messages in thread
From: Emacs bug Tracking System @ 2008-11-26  3:05 UTC (permalink / raw)
  To: Glenn Morris

[-- Attachment #1: Type: text/plain, Size: 887 bytes --]


Your message dated Tue, 25 Nov 2008 21:56:57 -0500
with message-id <4k5archza.fsf@fencepost.gnu.org>
and subject line Re: bug#1386: 23.0.60; vc-git-diff: diff switches can't be customized
has caused the Emacs bug report #1386,
regarding 23.0.60; vc-git-diff: diff switches can't be customized
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
1386: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1386
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 5642 bytes --]

From: Magnus Henoch <mange@freemail.hu>
To: quiet@emacsbugs.donarmstrong.com
Subject: 23.0.60; vc-git-diff: diff switches can't be customized
Date: Sun, 01 Jun 2008 16:12:46 +0200
Message-ID: <df3ahn43rb.fsf@fencepost.gnu.org>


[ 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''



[-- Attachment #3: Type: message/rfc822, Size: 1658 bytes --]

From: Glenn Morris <rgm@gnu.org>
To: 1386-done@emacsbugs.donarmstrong.com
Subject: Re: bug#1386: 23.0.60; vc-git-diff: diff switches can't be customized
Date: Tue, 25 Nov 2008 21:56:57 -0500
Message-ID: <4k5archza.fsf@fencepost.gnu.org>

2008-11-26  Glenn Morris  <rgm@gnu.org>

            * vc-git.el (vc-git-diff-switches): New option.
            (vc-git-diff): Apply diff switches.  (Bug#1386)



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-26  3:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4k5archza.fsf@fencepost.gnu.org>
     [not found] ` <df3ahn43rb.fsf@fencepost.gnu.org>
2008-11-21 19:37   ` bug#1386: 23.0.60; vc-git-diff: diff switches can't be customized Glenn Morris
2008-11-26  3:05   ` bug#1386: marked as done (23.0.60; vc-git-diff: diff switches can't be customized) Emacs bug Tracking System

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).