diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2024-09-26 23:39:11 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2024-09-26 23:39:11 +0200 |
commit | 2fb7b61a01fa8d40139a29a5a700d040f775caf3 (patch) | |
tree | 82e9c261a50cd286b67c1af77897f6887ef3558a | |
parent | cd21ed3b4ec3c8ad1ccca6bcffd41e211d659ae0 (diff) | |
parent | e9b0fc93a5976902d0b060a70bdee78765b36a7e (diff) | |
download | jgit-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.java | 5 |
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()); + } } } |