]> git.eshelyaron.com Git - emacs.git/commit
Fix vc-dir when "remote" Git branch is local
authorKévin Le Gouguec <kevin.legouguec@gmail.com>
Mon, 12 Feb 2024 07:29:19 +0000 (08:29 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 18 Mar 2024 15:44:11 +0000 (16:44 +0100)
commit07c52a564e43d12a0a217201ca687ea467ade57d
tree6a72ca6fa613d4e6f6a8d2cd7259405d04d7f621
parenta7f81bae4f44e6b9db95c97c9d0efcad479e58c2
Fix vc-dir when "remote" Git branch is local

While in there, add that "tracking" branch to the vc-dir
buffer.  For bug#68183.

* lisp/vc/vc-git.el (vc-git-dir-extra-headers): Reduce
boilerplate with new function 'vc-git--out-ok'; stop calling
vc-git-repository-url when REMOTE is "." to avoid throwing an
error; display tracking branch; prefer "none (<details...>)" to
"not (<details...>)" since that reads more grammatically
correct.
(vc-git--out-ok): Add documentation.
(vc-git--out-str): New function to easily get the output from a
Git command.
* test/lisp/vc/vc-git-tests.el (vc-git-test--with-repo)
(vc-git-test--run): New helpers, defined to steer clear of
vc-git-- internal functions.
(vc-git-test-dir-track-local-branch): Check that vc-dir does
not crash.

(cherry picked from commit 21828f288ef57422d12860d71e3d4cd8b8cc97b4)
lisp/vc/vc-git.el
test/lisp/vc/vc-git-tests.el