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 may be a file instead of a directory #68

Closed
sorrx opened this issue Aug 27, 2020 · 1 comment · Fixed by #71
Closed

.git may be a file instead of a directory #68

sorrx opened this issue Aug 27, 2020 · 1 comment · Fixed by #71

Comments

@sorrx
Copy link
Contributor

sorrx commented Aug 27, 2020

Note: Also you can have a plain text file .git at the root of your working tree, containing gitdir: <path> to point at the real directory that has the repository. (source: https://git-scm.com/docs/gitrepository-layout )

I have a project, where this is the case and the GitRepositoryProvider does not work out of the box.

Simple fix:
In Provider/GitRepositoryProvider.php replace line 55
if (is_dir($path . DIRECTORY_SEPARATOR . '.git')) {
with
if (file_exists($path . DIRECTORY_SEPARATOR . '.git')) {

@dontub
Copy link
Collaborator

dontub commented Feb 14, 2021

Thanks for reporting!

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

Successfully merging a pull request may close this issue.

2 participants