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

Does this work with bare repos? #19

Open
ajkessel opened this issue Nov 28, 2023 · 2 comments
Open

Does this work with bare repos? #19

ajkessel opened this issue Nov 28, 2023 · 2 comments

Comments

@ajkessel
Copy link

Is it possible to use GitBSLR to follow symlinks in bare repos? I have no .git folder and if I point GITBSLR_GIT_DIR at the same location as I use for --git-dir in my git command, I get the "git directory path must end with .git" error. Is this an inherent limitation of GitBSLR?

@Alcaro
Copy link
Owner

Alcaro commented Nov 28, 2023

It's a security restriction. GitBSLR doesn't want to create symlinks to any .git, not just the current one; it could get messy if anything follows them and writes something weird to a submodule's .git/hooks/.

That's the only reason that restriction exists. If you're only operating on trusted repositories (i.e. ones that don't contain symlinks to somewhere unexpected), it's safe to delete that check (line 422). (You may also want to remove the one at line 899.)

@ajkessel
Copy link
Author

Thanks, that works. Perhaps you want to allow another environment variables that turns off the check if people want to use this with bare repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants