GeezerVison is showing github.com — Cannot checkout repositories with relative symlinks in them · Issue #2107 · go-git/go-git
Cannot checkout repositories with relative symlinks in them #2107
Labels
bugSomething isn't working Description
Bug Description
Attempting a checkout of a repo containing a relative symlink throws an error
Steps to reproduce
go run ./_examples/clone/main.go https://github.com/lorin/openstack-ansible-modules.git ~/Desktop/lolwut
Expected result
Repository is cloned and a worktree is created at ~/Desktop/lolwut
Actual behavior
git clone https://github.com/lorin/openstack-ansible-modules.git /Users/nic/Desktop/lolwut --recursive
error: symlink: invalid path "../keystone_service": cannot use ".."
exit status 1
Miscellany
git clone https://github.com/lorin/openstack-ansible-modules.git /Users/nisimond/Desktop/lolwut --recursive
Cloning into '/Users/nic/Desktop/lolwut'...
remote: Enumerating objects: 565, done.
remote: Total 565 (delta 0), reused 0 (delta 0), pack-reused 565 (from 1)
Receiving objects: 100% (565/565), 170.64 KiB | 1.43 MiB/s, done.
Resolving deltas: 100% (304/304), done.
go-git Version
v6.0.0-20260511090450-983ee99d1198
Steps to Reproduce
go run ./_examples/clone/main.go https://github.com/lorin/openstack-ansible-modules.git ~/Desktop/lolwut
Additional Information
No response
Activity
added 4 commits that reference this issue
on May 12, 2026This issue will close once commit b04c8f2 is merged into the 'master' branch.b04c8f2 This issue will close once commit 55f48d9 is merged into the 'master' branch.55f48d9 This issue will close once commit 96f6c7f is merged into the 'master' branch.96f6c7f This issue will close once commit 6ab1ef9 is merged into the 'master' branch.6ab1ef9 0xDEC0DE commented on May 12, 2026
ContributorAuthor
More actions
This was introduced in commit 0ae66bd, which provided no explanation for the change, and deviates from the behaviour of plain Git.
pjbgf commented on May 12, 2026
@0xDEC0DE thanks for filing this issue, we are looking into it and should get a fix shortly.
pjbgf commented on May 12, 2026
Closing as per changes in main and backported to v5.
Metadata
Metadata
bugSomething isn't working Development
No branches or pull requestsIssue actions