aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2024-09-26 23:36:12 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2024-09-26 23:36:12 +0200
commit0a8d502100c54df2807818d9bbf020b089534fef (patch)
tree113affe4744c7a48fe19078e656b48ebdebd97ac
parentede678abf6bc821bbab6ee63e0a14660c9c886c6 (diff)
parent56a5db65b3e6c0c838b29071323332439dbbc08f (diff)
downloadjgit-stable-6.7.tar.gz
jgit-stable-6.7.zip
Merge branch 'stable-6.6' into stable-6.7stable-6.7
* stable-6.6: AdvertisedRequestValidator: fix WantNotValidException caused by race Change-Id: I5b7b097a4b57ec48a3ee20fc25cb0d080cc1af80
-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 78e9110c7c..301a7e6d9a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
@@ -1972,10 +1972,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());
+ }
}
}