Open zmyrgel opened 3 weeks ago
TIL of C-x v D
, i've always used vc-dir
(C-x v d
) which most of the times defaults to the root of the work tree.
I can reproduce the problem, and will look into it soon. I'm scared that calling expand-file-name
like that could have unwanted side effects.
I doubt it has any unwanted side effects but the patch is ugly.
I was thinking should the fix be even in the vc-level. Is there any reason the generic layer to pass these "short paths" to any vc-backends instead of always expanding them.
IIRC the path is coming from result of default-directory call in vc side. I think at least some of such pass go through expand-file-name but I didn't do full audit of them.
On Sun, Oct 6, 2024, at 17:59, Omar Polo wrote:
TIL of
C-x v D
, i've always usedvc-dir
(C-x v d
) which most of the times defaults to the root of the work tree.I can reproduce the problem, and will look into it soon. I'm scared that calling
expand-file-name
like that could have unwanted side effects.— Reply to this email directly, view it on GitHub https://github.com/omar-polo/vc-got/issues/18#issuecomment-2395470093, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAI72SR53OKXDZ6RSC756LZ2FF6PAVCNFSM6AAAAABPIGPK2GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJVGQ3TAMBZGM. You are receiving this because you authored the thread.Message ID: @.***>
If I have got worktree in ~/dotfiles and use {C-x v D} to see vc-root-diff the command fails to list anything and shows:
got: ~/dotfiles: No such file or directory
Problem is the short hand path for home directory which I guess is passed to got binary as is. This can be solved by following small diff:
The diff just expands the files passed to diff command. But instead of doing it just for diff, would it be better to expand vc-got--call to take files parameter separately so it can expand the filenames for all commands?