diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 597a1622f5a..8f3200c1a39 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2074,20 +2074,15 @@ vc-diff-build-argument-list-internal ;; filesets, but not yet. ((/= (length files) 1) nil) - ;; if it's a directory, don't supply any revision default - ((file-directory-p first) - nil) - ;; if the file is not up-to-date, use working revision as older revision - ((not (vc-up-to-date-p first)) - (setq rev1-default (vc-working-revision first))) ;; if the file is not locked, use last revision and current source as defaults (t - (setq rev1-default (ignore-errors ;If `previous-revision' doesn't work. - (vc-call-backend backend 'previous-revision first - (vc-working-revision first)))) - (when (string= rev1-default "") (setq rev1-default nil)))) + (push (ignore-errors ;If `previous-revision' doesn't work. + (vc-call-backend backend 'previous-revision first + (vc-working-revision first backend))) + rev1-default) + (when (member (car rev1-default) '("" nil)) (setq rev1-default nil)))) ;; construct argument list - (let* ((rev1-prompt (format-prompt "Older revision" rev1-default)) + (let* ((rev1-prompt (format-prompt "Older revision" (car rev1-default))) (rev2-prompt (format-prompt "Newer revision" ;; (or rev2-default "current source")) @@ -2119,9 +2114,8 @@ vc-root-version-diff "Report diffs between REV1 and REV2 revisions of the whole tree." (interactive (vc-diff-build-argument-list-internal - (or (ignore-errors (vc-deduce-fileset t)) - (let ((backend (or (vc-deduce-backend) (vc-responsible-backend default-directory)))) - (list backend (list (vc-call-backend backend 'root default-directory))))))) + (let ((backend (or (vc-deduce-backend) (vc-responsible-backend default-directory)))) + (list backend (list (vc-call-backend backend 'root default-directory)))))) ;; This is a mix of `vc-root-diff' and `vc-version-diff' (when (and (not rev1) rev2) (error "Not a valid revision range"))