aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2024-09-26 23:37:14 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2024-09-26 23:37:14 +0200
commit9e7d2acadd3ebeb3995ebd00c0ca4a86e1f4ea67 (patch)
tree0cbbf5421d0f7971707c2ff5b532006eaf6519ca
parent91426e8c90dff0370914bf4989dd136a26a3a9f5 (diff)
parent7c26efb203f6e48b3f13da24c99eb731400ecd94 (diff)
downloadjgit-stable-6.9.tar.gz
jgit-stable-6.9.zip
Merge branch 'stable-6.8' into stable-6.9stable-6.9
* stable-6.8: AdvertisedRequestValidator: fix WantNotValidException caused by race Change-Id: Ia5a0a4f0e900d96fa638bb9f97988ac66f4b7068
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java5
1 files changed, 2 insertions, 3 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 9318871520..1dcfe5691f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
@@ -1996,10 +1996,9 @@ public class UploadPack implements Closeable {
@Override
public void checkWants(UploadPack up, List<ObjectId> wants)
throws PackProtocolException, IOException {
- if (!up.isBiDirectionalPipe())
+ if (!up.isBiDirectionalPipe() || !wants.isEmpty()) {
new ReachableCommitRequestValidator().checkWants(up, wants);
- else if (!wants.isEmpty())
- throw new WantNotValidException(wants.iterator().next());
+ }
}
}