Browse Source
The AdvertiseRefsHook can be called twice if the following conditions hold: 1. This AdvertiseRefsHook doesn't set this.refs. 2. getAdvertisedOrDefaultRefs is called after getFilteredRefs. For example, this can happen when fetchV2 is called after lsRefsV2 when using a stateful bidirectional transport. The second call does not accomplish anything useful. Guard it with 'if (!advertiseRefsHookCalled)' to avoid wasted work. Reported-by: Jonathan Tan <jonathantanmy@google.com> Change-Id: Ib746582e4ef645b767a5b3fb969596df99ac2ab5 Signed-off-by: Jonathan Nieder <jrn@google.com>stable-5.0
Jonathan Nieder
6 years ago
1 changed files with 4 additions and 2 deletions
Loading…
Reference in new issue