summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2022-01-18 17:49:03 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2022-01-18 17:49:03 +0100
commit1e59cabc08ffddaae7129f0407f7ae17f01c5d90 (patch)
treebe6e1dcee2bb28d0834412a28551e859efe67860 /org.eclipse.jgit
parent44bad3d98e9fe41fc103b6981ec3c623ef9388f3 (diff)
parent78d4fb1ca00149a700f586357139f08efaa29ff6 (diff)
downloadjgit-1e59cabc08ffddaae7129f0407f7ae17f01c5d90.tar.gz
jgit-1e59cabc08ffddaae7129f0407f7ae17f01c5d90.zip
Merge branch 'stable-5.11' into stable-5.12
* stable-5.11: UploadPack v2 protocol: Stop negotiation for orphan refs Change-Id: I5db432bd416cfa8d3dd295bdce63e31d5f160a8a
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java5
1 files changed, 5 insertions, 0 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 9fda639280..63deff2d9e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
@@ -2103,6 +2103,11 @@ public class UploadPack {
if (want.has(SATISFIED))
return true;
+ if (((RevCommit) want).getParentCount() == 0) {
+ want.add(SATISFIED);
+ return true;
+ }
+
walk.resetRetain(SAVE);
walk.markStart((RevCommit) want);
if (oldestTime != 0)