If we've seen one piece of code break here already, then perhaps
reverting and moving to the other (safer, but more invasive) approach is
the right way to go.
Fair enough.
Pushed the other patch with a couple of small tweaks.
This broke vc-rename-file that now fails with
(error Failed (status 128): git --no-pager mv -f --
:(literal)/tmp/gitrepo/subdir/file1 :(literal)/tmp/gitrepo/subdir/file2)
fatal: bad source, source=subdir/:(literal)/tmp/gitrepo/subdir/file1,
destination=subdir/:(literal)/tmp/gitrepo/subdir/file2
Can be fixed with
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 02ca022ad4..88e015fc9d 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1559,7 +1559,7 @@ vc-git-delete-file
(vc-git-command nil 0 (vc-git--literal-pathspecs file) "rm" "-f" "--"))
(defun vc-git-rename-file (old new)
- (vc-git-command nil 0 (vc-git--literal-pathspecs (list old new)) "mv" "-f"
"--"))
+ (vc-git-command nil 0 (list old new) "mv" "-f" "--"))
(defun vc-git-mark-resolved (files)
(vc-git-command nil 0 (vc-git--literal-pathspecs files) "add"))