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

Won't-fix: Failed to open repository of uploaded directory: .git not found #8

Open
happybeing opened this issue Dec 16, 2020 · 0 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@happybeing
Copy link
Collaborator

When uploading a bare repository that has an empty refs subdirectory you will get the following error from the repo.OpenRepository() API, and passed back to the user interface:

Failed to open repository of uploaded directory: .git not found

This is because uploading a directory to the browser does not create empty subdirectories.

This does not need to be fixed for the proof-of-concept.

Possible Solution (when needed):

  1. In git-bug, change isGitDirFs() to avoid the issue by changing the checks so that it only checks for directories which contain files, and for files we know should exist. This will allow the validity check to pass. For example, use:
markers := []string{"HEAD", "hooks", "info"}
  1. We must also ensure that any missing directories are created so as not to cause problems using the repository. So, after upload and before the call to git portal src/repo/repo_gitbug.go, repo.OpenRepo(), create all of the empty directories which are created by a git init --bare.

Alternatives:

There may be better alternatives to this, such as creating a bare repository on the browser filesystem and then uploading to it.

@happybeing happybeing added the wontfix This will not be worked on label Dec 16, 2020
@happybeing happybeing changed the title Failed to open repository of uploaded directory: .git not found Won't-fix: Failed to open repository of uploaded directory: .git not found Dec 16, 2020
@happybeing happybeing added the bug Something isn't working label Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant