diff options
author | Daniel Smith <[email protected]> | 2025-08-12 15:23:49 +0200 |
---|---|---|
committer | Jukka Jokiniva <[email protected]> | 2025-08-13 04:46:31 +0000 |
commit | b6f05eb24d3bc6d184db221df6975fb92ace47be (patch) | |
tree | 0e95ff32e2c85f6516e6f9e33ed3a82bf071e3e2 | |
parent | 5fe9c41ae0caf027bbd1162936d60f3c65b30d59 (diff) |
Workaround for broken merge commit meta historyv3.10.6-based
This patch is a temporary workaround for displaying
merge commits in Gerrit. The workflow plugin
worked around a previous limitation of gerrit when
attempting to merge "merge commits"; This resulted
in an invalid patchset in the meta history which
references the same sha as the final user-uploaded
patchset. Changes in gerrit upstream that provide
new functionality for fetching parents of a change
broke when encountering this duplicate/virtual
patchset.
Task-number: QTQAINFRA-7338
Change-Id: I995072b6354cf95dc1492e8342a744eb6e752b13
Reviewed-by: Jukka Jokiniva <[email protected]>
-rw-r--r-- | java/com/google/gerrit/server/change/ParentDataProvider.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/java/com/google/gerrit/server/change/ParentDataProvider.java b/java/com/google/gerrit/server/change/ParentDataProvider.java index ffa46764ba..b6ae711399 100644 --- a/java/com/google/gerrit/server/change/ParentDataProvider.java +++ b/java/com/google/gerrit/server/change/ParentDataProvider.java @@ -113,6 +113,7 @@ public class ParentDataProvider { int patchSetNumber = singleData.patchSets().stream() .filter(p -> p.commitId().equals(parentCommitId)) + .findFirst().stream() .collect(MoreCollectors.onlyElement()) .number(); return Optional.of( |