google / gitiles

A simple browser for Git repositories.
https://gerrit.googlesource.com/gitiles/
Other
582 stars 174 forks source link

HTTP 404 Error for +/refs/*/$BRANCH$ #223

Closed misilita closed 3 years ago

misilita commented 3 years ago

[Environment: Gerrit 2.15.3 with Gitiles 2.15]

We have a repo that has 100+ branches and 100+ tags. When we access it via the GERRIT UI "Branches" tab, we get an HTTP404 error. Observed for: http://$GERRIT_URL$/plugins/gitiles/$REPO$/+/refs/heads/$BRANCH$ http://$GERRIT_URL$/plugins/gitiles/$REPO$/+/refs/tags/$BRANCH$

Other repos that have lesser no. of branches/tags have no problem with it.

However, if we remove the "refs/heads" (http://$GERRIT_URL$/plugins/gitiles/$REPO$/+/$BRANCH$) portion, gitiles is able to render it properly.

Modifying heapLimit, core.packed* settings in gerrit.config does not help. Did not also find anything in the documentation for gitiles.config that could possibly help.

Are there any special setting that could be configured to resolve this?

jjhud1979 commented 3 years ago

@misilita :joy:

Sent from my LM-Q730 using FastHub

misilita commented 3 years ago

We found the culprit. Someone pushed a branch called "ref" to the remote causing the problem. After deleting that branch, everything worked normal.

jjhud1979 commented 3 years ago

Thanks for your help 🐱