]> git.eshelyaron.com Git - emacs.git/commit
vc-git-diff: Fix case where REV1 & REV2 are nil and no commits yet
authorSean Whitton <spwhitton@spwhitton.name>
Wed, 16 Jul 2025 08:55:54 +0000 (09:55 +0100)
committerEshel Yaron <me@eshelyaron.com>
Thu, 24 Jul 2025 09:48:09 +0000 (11:48 +0200)
commit1c99bb9c656118e950d51a485c05b8273dde1f79
treebe2dbc021cb9c911e9e44aeb08462a934ec144f2
parent257deffd6289dfd9d2dafa2e14e59de7e9e3e76a
vc-git-diff: Fix case where REV1 & REV2 are nil and no commits yet

* lisp/vc/vc-git.el (vc-git--empty-tree): New constant.
(vc-git-diff): When REV1 and REV2 are both nil and there are no
commits yet, diff against the empty tree object (bug#78987).

(cherry picked from commit aec5c5f037b72f2ab49b17f4e3f6655e0c2125b3)
lisp/vc/vc-git.el