Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Exception on render with empty repository #291
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.
referenced this issue
Mar 30, 2013
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
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.