Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git/gogit: modify chroot to return a new os filesystem #419

Merged
merged 1 commit into from
Nov 28, 2022

Conversation

aryan9600
Copy link
Member

Modify Chroot() into returning a new OS filesystem. The filesystem returned is not actually chrooted, but only enforces all files to be under the root working directory. This is required to avoid breaking cloning repos with submodules. Ref: https://github.com/fluxcd/go-git/blob/d979ddd67ae30aebcdd285c0b0133594e7194980/storage/filesystem/dotgit/dotgit.go#L1100-L1103

Related to: fluxcd/source-controller#970

Signed-off-by: Sanskar Jaiswal jaiswalsanskar078@gmail.com

@aryan9600 aryan9600 requested a review from pjbgf November 28, 2022 14:32
@pjbgf pjbgf added the area/git Git and SSH related issues and pull requests label Nov 28, 2022
@pjbgf pjbgf added this to the Bootstrap GA milestone Nov 28, 2022
git/gogit/fs/osfs_os.go Show resolved Hide resolved
git/gogit/fs/osfs_os.go Outdated Show resolved Hide resolved
Modify `Chroot()` into returning a new OS filesystem. The filesystem
returned is not actually chrooted, but only enforces all files to be
under the root working directory. This is required to avoid breaking
cloning repos with submodules.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Copy link
Member

@pjbgf pjbgf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/git Git and SSH related issues and pull requests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants