Commit b2dd61ff authored by Juri Linkov's avatar Juri Linkov

* lisp/vc/vc.el (vc-diff-build-argument-list-internal): Add arg fileset.

(vc-root-version-diff): Set vc-diff-build-argument-list-internal's
optional arg 'fileset' to the root directory.  (Bug#34532)
parent ded3c8de
Pipeline #1024 failed with stage
in 60 minutes and 2 seconds
......@@ -950,8 +950,7 @@ In the latter case, VC mode is deactivated for this buffer."
(bindings--define-key map [separator2] menu-bar-separator)
(bindings--define-key map [vc-insert-header]
'(menu-item "Insert Header" vc-insert-headers
:help "Insert headers into a file for use with a version control system.
"))
:help "Insert headers into a file for use with a version control system."))
(bindings--define-key map [vc-revert]
'(menu-item "Revert to Base Version" vc-revert
:help "Revert working copies of the selected file set to their repository contents"))
......
......@@ -1762,9 +1762,9 @@ Return t if the buffer had changes, nil otherwise."
nil nil initial-input 'vc-revision-history default)
(read-string prompt initial-input nil default))))
(defun vc-diff-build-argument-list-internal ()
(defun vc-diff-build-argument-list-internal (&optional fileset)
"Build argument list for calling internal diff functions."
(let* ((vc-fileset (vc-deduce-fileset t)) ;FIXME: why t? --Stef
(let* ((vc-fileset (or fileset (vc-deduce-fileset t))) ;FIXME: why t? --Stef
(files (cadr vc-fileset))
(backend (car vc-fileset))
(first (car files))
......@@ -1815,7 +1815,11 @@ Return t if the buffer had changes, nil otherwise."
;;;###autoload
(defun vc-root-version-diff (_files rev1 rev2)
"Report diffs between REV1 and REV2 revisions of the whole tree."
(interactive (vc-diff-build-argument-list-internal))
(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)))))))
;; This is a mix of `vc-root-diff' and `vc-version-diff'
(when (and (not rev1) rev2)
(error "Not a valid revision range"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment