Function: vc-root-diff

vc-root-diff is an autoloaded, interactive and byte-compiled function defined in vc.el.gz.

Signature

(vc-root-diff HISTORIC &optional NOT-ESSENTIAL)

Documentation

Display diffs between VC-controlled whole tree revisions.

Normally, this compares the tree corresponding to the current fileset with the working revision. With a prefix argument HISTORIC, prompt for two revision designators specifying which revisions to compare.

Optional argument NOT-ESSENTIAL non-nil means it is okay to say no to saving the buffer.

View in manual

Probably introduced at or before Emacs version 23.2.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
;;;###autoload
(defun vc-root-diff (historic &optional not-essential)
  "Display diffs between VC-controlled whole tree revisions.
Normally, this compares the tree corresponding to the current
fileset with the working revision.
With a prefix argument HISTORIC, prompt for two revision
designators specifying which revisions to compare.

Optional argument NOT-ESSENTIAL non-nil means it is okay to say no to
saving the buffer."
  (interactive (list current-prefix-arg t))
  (if historic
      ;; We want the diff for the VC root dir.
      (call-interactively 'vc-root-version-diff)
    (vc--with-backend-in-rootdir "VC root-diff"
      ;; VC diff for the root directory produces output that is
      ;; relative to it.  Bind default-directory to the root directory
      ;; here, this way the *vc-diff* buffer is setup correctly, so
      ;; relative file names work.
      (let ((fileset `(,backend (,rootdir))))
        (vc-buffer-sync-fileset fileset not-essential)
        (vc-diff-internal vc-allow-async-diff fileset nil nil
                          (called-interactively-p 'interactive))))))