diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2024-09-26 23:38:31 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2024-09-26 23:38:31 +0200 |
commit | e9b0fc93a5976902d0b060a70bdee78765b36a7e (patch) | |
tree | 5effc69a96d7baf59da8f7386193211760b39e49 /org.eclipse.jgit/src/org/eclipse/jgit | |
parent | df497514c7ca6991c0326ff334cb8998acdf2059 (diff) | |
parent | 1cd87ab79065b78a0774f20f1bfd522747c37c15 (diff) | |
download | jgit-e9b0fc93a5976902d0b060a70bdee78765b36a7e.tar.gz jgit-e9b0fc93a5976902d0b060a70bdee78765b36a7e.zip |
Merge branch 'stable-6.10' into stable-7.0
* stable-6.10:
AdvertisedRequestValidator: fix WantNotValidException caused by race
Change-Id: I22ec79d91136f8209a3799465db5593d83f7bea9
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit')
-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()); + } } } |