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

500 on branch index for long branch name pushed together with other branch #303

cirosantilli opened this issue Nov 20, 2014 · 2 comments


None yet
1 participant
Copy link

commented Nov 20, 2014

To reproduce:

  • create a new repo with the defaults instructions and push
  • go into .git/refs/heads and create two branches:
    • one with 255 chars (max file size): cp master $(python -c 'print "m" * 255')
    • another one with any name: cp master a
  • git push --all

Et voila:

The mystery to me is why it only works if I push 2 branches at once... and if I delete a it works again. Beyond me without the source.

Might be related to the creation of lock files which add 5 extra chars to the filename .lock. At least that is why branch creation with git branch cannot be used.

Another mystery:

curl -H "Authorization: token $TOKEN"$ID/git/refs/

says there are 2 branches (master and a), but the GH UI only 1.


This comment has been minimized.

Copy link
Collaborator Author

commented Nov 21, 2014

Robert Sese replied.


This comment has been minimized.

Copy link
Collaborator Author

commented Dec 29, 2014

For branch names between 250 and 255 chars, the push now hangs forever, so this cannot be reproduced anymore.

Also, the best way to try this is to push directly with:

git push repo master:"$(python -c 'print 251 * "c"')"

no need for cp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.