You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Create empty repository
2. Create simple pre-receive hook denying CREATE command
3. PUSH new MASTER branch
4. Do anything with the REPO -> NPE
What is the expected output? What do you see instead?
GitBlit now handles the repository as non-empty. However it has problems getting HEAD
ref as it does not have any (its creation was blocked).
What version of the product are you using? On what operating system?
GitBlit 0.8.2
Please provide any additional information below.
Not sure whether the pre-receive hook has anything to do with the NPE. However the
UI started to handle repository as a non-empty after the rejected push. So there might
be actually two bugs (check the last exception in the attached log file).
This is not a severe error as the application is able to work. Still, it is an ugly
NPE in the log file.
I didn't check closed issues. The issue 310 is about the exactly same exception. Still
I feel that this might be a little bit different context as the issue 310 should have
been fixed.
This is a sneaky one. It is not exactly the same as issue 310. This exception is thrown
because the repository has commits but HEAD remains unlinked. This exception will
be thrown on the first commit to any empty repository. This is a side-effect of peeking
at the repository during push - which Gitblit did not do prior to 0.8.0.
My fix for issue 310 was to manually check the repository for loose/packed objects.
That ensured that commits were available and assumed that HEAD was linked to one of
them, but in this case HEAD is still unlinked.
Originally reported on Google Code with ID 69
Reported by
horal.pavel
on 2012-02-23 18:54:54- _Attachment: [security.groovy](https://storage.googleapis.com/google-code-attachments/gitblit/issue-69/comment-0/security.groovy)_ - _Attachment: [catalina.out](https://storage.googleapis.com/google-code-attachments/gitblit/issue-69/comment-0/catalina.out)_
The text was updated successfully, but these errors were encountered: