I'm currently using (vc-root-diff nil) however, I'd like to spesify a branch.

Calling (vc-root-diff t) prompts for the revision, and the path.

Is there a way to diff against a branch without, manually entering it in every time?

1 Answer 1


This can be done using:

(vc-root-version-diff nil "master" nil)

  • The first nil could be replaced by (vc-root-dir).
  • The second one could be replaced by HEAD however this doesn't include local changes to the tree, so it needs to be nil.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.