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
Exception on render with empty repository #291
Comments
+1 |
Currently, if it's null, we don't handle the situation properly. @NateEag, can you take a look at that code you submitted some time ago and see if you're able to support null branches? |
I'll try to take a look. I assume we'd just want to display a basic "no commits yet" message if you try to view an empty repo? |
The problem is not exactly what to do (no files, no commits, etc, would be the best choice), but avoid routes from crashing. |
Interestingly, when I first tried to reproduce this, I could not. I pulled current master and initialized a bare repo in my repos directory, and the index page just worked. Once I updated my dependencies with Composer, however, the problem started happening. This makes me wonder whether the issue may be lurking in one of GitList's dependencies, rather than in GitList itself, as the problem did not occur for me with older dependencies? Possibly some behavior change in Gitter? I've saved my previous composer.lock, to enable further research. That said, a quick nasty hack that makes the index page work is:
Not lovely, but better than totally broken. I may not get a chance to look at this again for a little while, so if someone else has time, feel free to dig in. |
Hi,
I get an exception when i try to open the index page when one of the repositories in my repo-directory is empty (freshly created with git --bare init).
Oops! An exception has been thrown during the rendering of a template ("Parameter "branch" for route "rss" must match "[\w-._/]+" ("" given) to generate a corresponding URL.") in "index.twig" at line 13.
When i create the master branch by committing something to the directory the issue does not appear anymore.
Greetings,
Rik
The text was updated successfully, but these errors were encountered: