]> git.eshelyaron.com Git - emacs.git/commitdiff
Work around the asynchronous-empty-diff problem
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 22 Nov 2015 04:59:50 +0000 (06:59 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 22 Nov 2015 05:00:31 +0000 (07:00 +0200)
* lisp/vc/vc-rcs.el (vc-rcs-diff):
* lisp/vc/vc-mtn.el (vc-mtn-diff):
* lisp/vc/vc-hg.el (vc-hg-diff):
* lisp/vc/vc-git.el (vc-git-diff): Ignore the ASYNC argument,
do a synchronous process call (bug#21969).

lisp/vc/vc-git.el
lisp/vc/vc-hg.el
lisp/vc/vc-mtn.el
lisp/vc/vc-rcs.el

index 8bf37f09dc2ffa527832694a6ea56eaa2e070523..99084183a8c3814b68f822dd8ffae609aecac93c 100644 (file)
@@ -1050,7 +1050,7 @@ or BRANCH^ (where \"^\" can be repeated)."
 
 (autoload 'vc-switches "vc")
 
-(defun vc-git-diff (files &optional rev1 rev2 buffer async)
+(defun vc-git-diff (files &optional rev1 rev2 buffer _async)
   "Get a difference report using Git between two revisions of FILES."
   (let (process-file-side-effects
         (command "diff-tree"))
@@ -1061,7 +1061,7 @@ or BRANCH^ (where \"^\" can be repeated)."
       (unless rev1 (setq rev1 "HEAD")))
     (if vc-git-diff-switches
         (apply #'vc-git-command (or buffer "*vc-diff*")
-              (if async 'async 1)
+              1 ; bug#21969
               files
                command
                "--exit-code"
index 92b0c3169c1cca097687fa53c5ec626413c4cd1d..dd897adc59cc412165889e9650d90be5319b58f5 100644 (file)
@@ -335,7 +335,7 @@ If LIMIT is non-nil, show no more than this many entries."
 
 (autoload 'vc-switches "vc")
 
-(defun vc-hg-diff (files &optional oldvers newvers buffer async)
+(defun vc-hg-diff (files &optional oldvers newvers buffer _async)
   "Get a difference report using hg between two revisions of FILES."
   (let* ((firstfile (car files))
          (working (and firstfile (vc-working-revision firstfile))))
@@ -345,8 +345,8 @@ If LIMIT is non-nil, show no more than this many entries."
       (setq oldvers working))
     (apply #'vc-hg-command
           (or buffer "*vc-diff*")
-          (if async 'async nil)
-          files "diff"
+           nil ; bug#21969
+           files "diff"
            (append
             (vc-switches 'hg 'diff)
             (when oldvers
index b56a08f2a9ec8f31be8adbb6823590c39b874d6f..3b59c61eb782bbe0e194c99c50be5aebd06392b7 100644 (file)
@@ -253,10 +253,10 @@ If LIMIT is non-nil, show no more than this many entries."
 
 (autoload 'vc-switches "vc")
 
-(defun vc-mtn-diff (files &optional rev1 rev2 buffer async)
+(defun vc-mtn-diff (files &optional rev1 rev2 buffer _async)
   "Get a difference report using monotone between two revisions of FILES."
   (apply 'vc-mtn-command (or buffer "*vc-diff*")
-        (if async 'async 1)
+        1 ; bug#21969
         files "diff"
          (append
            (vc-switches 'mtn 'diff)
index ba1336424ea019a9674c279bb73bd96b4764513e..3e43546967c8ec9364d5dc3092e8e6f7b2b52649 100644 (file)
@@ -534,10 +534,11 @@ files beneath it."
     (vc-rcs-print-log-cleanup))
   (when limit 'limit-unsupported))
 
-(defun vc-rcs-diff (files &optional oldvers newvers buffer async)
+(defun vc-rcs-diff (files &optional oldvers newvers buffer _async)
   "Get a difference report using RCS between two sets of files."
   (apply #'vc-do-command (or buffer "*vc-diff*")
-        (if async 'async 1)
+        ;; The repo is local, so this is fast anyway.
+        1 ; bug#21969
         "rcsdiff" (vc-expand-dirs files 'RCS)
          (append (list "-q"
                        (and oldvers (concat "-r" oldvers))