Fix NullPointerException on push over HTTP
Push over HTTP is failing with an NullPointerException because
'allRefs' in ReceiveCommits is not set.
When pushing over HTTP two requests are received by Gerrit:
1. GET /myProject/info/refs
ReceiveCommits is instantiated, the refs are advertised so that
'allRefs' gets set from the AdvertiseRefsHook
2. POST /myProject/git-receive-pack
Another instance of ReceiveCommits is created, 'allRefs'
doesn't get set for this instance, as result the request is failing
with an NullPointerException
Fix this by ensuring that the AdvertiseRefsHook is triggered for each
request so that so that 'allRefs' always gets set.
Change-Id: I794ba1cc1cc87ef90e64c6d0350ca1d29d6afaaf
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
1 file changed