aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2024-09-26 23:36:45 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2024-09-26 23:36:45 +0200
commit7c26efb203f6e48b3f13da24c99eb731400ecd94 (patch)
treeac0a22957aa7ba25bb2d424baedd1019b302cebe
parent7dceb15e53a533843b964203bdc2e8d07a32a436 (diff)
parent0a8d502100c54df2807818d9bbf020b089534fef (diff)
downloadjgit-stable-6.8.tar.gz
jgit-stable-6.8.zip
Merge branch 'stable-6.7' into stable-6.8stable-6.8
* stable-6.7: AdvertisedRequestValidator: fix WantNotValidException caused by race Change-Id: I1e485422608cf55373c1d86c4c0d50c9f9f49f20
-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());
+ }
}
}