You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that AlternateFS doesn't work with git's clone --shared. For example:
There is a repo /path1/....../gitea-repositories/user2/repo-pull-request-target.git ( altRepoPath )
Then "clone --shared" to /path2/....../temp.git
If I use osfs.New(altRepoPath, osfs.WithChrootOS())
then func (d *DotGit) Alternates() changes the path to ../../../../../../../../gitea-repositories/user2/repo-pull-request-target.git/objects, which is inaccessible, then Alternates returns error.
If I use osfs.New(altRepoPath, osfs.WithBoundOS())
then func (d *DotGit) Alternates() insists to use path /path1/....../gitea-repositories/user2/repo-pull-request-target.git/path1/....../gitea-repositories/user2/repo-pull-request-target.git (duplicated, strange), which is still incorrect, the path is inaccessible.
Then, whatever I used to construct AlternateFS, I couldn't make DotGit work. The only working approach is: AlternativeFS: osfs.New("/")
The text was updated successfully, but these errors were encountered:
wxiaoguang
changed the title
It seems that AlternateFS doesn't work with git's clone --shared relative path
It seems that AlternateFS doesn't work with git's clone --sharedJan 22, 2024
It seems that AlternateFS doesn't work with git's
clone --shared
. For example:There is a repo
/path1/....../gitea-repositories/user2/repo-pull-request-target.git
( altRepoPath )Then "clone --shared" to
/path2/....../temp.git
If I use
osfs.New(altRepoPath, osfs.WithChrootOS())
func (d *DotGit) Alternates()
changes the path to../../../../../../../../gitea-repositories/user2/repo-pull-request-target.git/objects
, which is inaccessible, thenAlternates
returns error.If I use
osfs.New(altRepoPath, osfs.WithBoundOS())
func (d *DotGit) Alternates()
insists to use path/path1/....../gitea-repositories/user2/repo-pull-request-target.git/path1/....../gitea-repositories/user2/repo-pull-request-target.git
(duplicated, strange), which is still incorrect, the path is inaccessible.Then, whatever I used to construct AlternateFS, I couldn't make DotGit work. The only working approach is:
AlternativeFS: osfs.New("/")
The text was updated successfully, but these errors were encountered: