emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/vc-fossil a57356e 061/111: Refactor find-revision command.


From: ELPA Syncer
Subject: [nongnu] elpa/vc-fossil a57356e 061/111: Refactor find-revision command.
Date: Wed, 29 Sep 2021 08:59:21 -0400 (EDT)

branch: elpa/vc-fossil
commit a57356e1838281686aa9709702f5ebf529cdb8f9
Author: fifr <fifr>
Commit: fifr <fifr>

    Refactor find-revision command.
---
 vc/el/vc-fossil.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/vc/el/vc-fossil.el b/vc/el/vc-fossil.el
index ed3cf5d..b12c5e4 100644
--- a/vc/el/vc-fossil.el
+++ b/vc/el/vc-fossil.el
@@ -213,13 +213,11 @@ If `files` is nil return the status for all files."
          (vc-switches 'Fossil 'checkin)))
 
 (defun vc-fossil-find-revision (file rev buffer)
-  (if (zerop (length rev))
-      (apply #'vc-fossil-command buffer 0 file
-             "cat"
-             (vc-switches 'Fossil 'checkout))
-    (apply #'vc-fossil-command buffer 0 file
-           "cat" "-r" rev
-           (vc-switches 'Fossil 'checkout))))
+  (apply #'vc-fossil-command buffer 0 file
+         "cat"
+         (nconc
+          (unless (zerop (length rev)) (list "-r" rev))
+          (vc-switches 'Fossil 'checkout))))
 
 (defun vc-fossil-checkout (file &optional editable rev)
   (apply #'vc-fossil-command nil 0 file



reply via email to

[Prev in Thread] Current Thread [Next in Thread]