summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Nieder <jrn@google.com>2018-12-26 13:24:26 -0800
committerJonathan Nieder <jrn@google.com>2018-12-26 13:24:26 -0800
commit53ab1188d50149a22b2589e6017aba259f77b10b (patch)
treeee3db83144bdb6252adc58e060491a3413c5e53b
parentd14209e81b6c45ebbb46c324d67ac39384f80bbd (diff)
parentc961e2d7730b5e0e63841e16bf82ec3d9f589133 (diff)
downloadjgit-53ab1188d50149a22b2589e6017aba259f77b10b.tar.gz
jgit-53ab1188d50149a22b2589e6017aba259f77b10b.zip
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>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
index bac877a272..48a3e0b38f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
@@ -805,8 +805,10 @@ public class UploadPack {
return refs;
}
- advertiseRefsHook.advertiseRefs(this);
- advertiseRefsHookCalled = true;
+ if (!advertiseRefsHookCalled) {
+ advertiseRefsHook.advertiseRefs(this);
+ advertiseRefsHookCalled = true;
+ }
if (refs == null) {
// Fall back to all refs.
setAdvertisedRefs(