With the repo on Windows networked drive, "git commit -a" sends the wrong path to the text editor.
When the repo is on an internal drive, "git commit -a" works as expected, the text editor is opened with Repo\.git\COMMIT_EDITMSG, and git waits until the file is edited, saved and the editor is closed.
But for a repo on a networked drive, git sends to the editor the path
\\readyshare\USB_Storage\Repo\readyshare\USB_Storage\Repo\.git\COMMIT_EDITMSG
which is wrong. This should have been
\\readyshare\USB_Storage\Repo\.git\COMMIT_EDITMSG
Or equivalently git using the windows path
Z:\Repo\.git\COMMIT_EDITMSG
This happens both on W7 and W10, git version 2.39.0.windows.2 (and earlier).
Does anyone know how to fix this?
After some interaction on github (https://github.com/git-for-windows/git/issues/4207) it turned out that the issue was not with git, but with the editor I set as core.editor, TextPad 6.