aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2024-09-26 23:39:11 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2024-09-26 23:39:11 +0200
commit2fb7b61a01fa8d40139a29a5a700d040f775caf3 (patch)
tree82e9c261a50cd286b67c1af77897f6887ef3558a
parentcd21ed3b4ec3c8ad1ccca6bcffd41e211d659ae0 (diff)
parente9b0fc93a5976902d0b060a70bdee78765b36a7e (diff)
downloadjgit-2fb7b61a01fa8d40139a29a5a700d040f775caf3.tar.gz
jgit-2fb7b61a01fa8d40139a29a5a700d040f775caf3.zip
Merge branch 'stable-7.0'
* stable-7.0: AdvertisedRequestValidator: fix WantNotValidException caused by race Change-Id: If885f81c5273693c0c9c6efcfe4b646ab936cefe
-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 ec51c885c6..3772c00819 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
@@ -1937,10 +1937,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());
+ }
}
}