branch: elpa/vc-fossil
commit 9f3170907aad6b7276a9982b0520d8b0f7545967
Author: fifr <fifr>
Commit: fifr <fifr>
Fix diff command if old rev is not specified.
In this case the source revision should be current.
---
vc/el/vc-fossil.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/vc/el/vc-fossil.el b/vc/el/vc-fossil.el
index 692cf9e..4aaabd6 100644
--- a/vc/el/vc-fossil.el
+++ b/vc/el/vc-fossil.el
@@ -279,8 +279,9 @@ If `files` is nil return the status for all files."
(apply #'vc-fossil-command
buf 0 file "diff" "-i"
(nconc
- (and rev1 (list "--from" rev1))
- (and rev2 (list "--to" rev2))
+ (cond
+ (rev2 (list "--from" (or rev1 "current") "--to" rev2))
+ (rev1 (list "--from" rev1)))
(vc-switches 'Fossil 'diff)))))
(defun vc-fossil-annotate-command (file buffer &optional rev)