Merge branch 'stable-5.0' into stable-5.1

* stable-5.0:
  UploadPack: Avoid calling AdvertiseRefsHook twice

Change-Id: Ie9ce67921e38fff8338a148c4d9f2776be01d0b0
Signed-off-by: Jonathan Nieder <jrn@google.com>
This commit is contained in:
Jonathan Nieder 2018-12-26 13:24:26 -08:00
commit 53ab1188d5
1 changed files with 4 additions and 2 deletions

View File

@ -805,8 +805,10 @@ private Map<String, Ref> getAdvertisedOrDefaultRefs() throws IOException {
return refs;
}
advertiseRefsHook.advertiseRefs(this);
advertiseRefsHookCalled = true;
if (!advertiseRefsHookCalled) {
advertiseRefsHook.advertiseRefs(this);
advertiseRefsHookCalled = true;
}
if (refs == null) {
// Fall back to all refs.
setAdvertisedRefs(