diff options
author | Jonathan Nieder <jrn@google.com> | 2018-12-26 12:40:28 -0800 |
---|---|---|
committer | Jonathan Nieder <jrn@google.com> | 2018-12-26 13:19:01 -0800 |
commit | c961e2d7730b5e0e63841e16bf82ec3d9f589133 (patch) | |
tree | 44adfbaa0ca89c537457c5f21d0943e1b991d630 /org.eclipse.jgit.http.test/tst | |
parent | 8eecb4f8b746bc01f09df02870e89d4bc4e118b9 (diff) | |
download | jgit-c961e2d7730b5e0e63841e16bf82ec3d9f589133.tar.gz jgit-c961e2d7730b5e0e63841e16bf82ec3d9f589133.zip |
UploadPack: Avoid calling AdvertiseRefsHook twice
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>
Diffstat (limited to 'org.eclipse.jgit.http.test/tst')
0 files changed, 0 insertions, 0 deletions