mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-12 04:53:52 -06:00
fix: keep upstream HEAD for a pin past the fork
_follow_fork_base swapped the fork merge base in as upstream HEAD even when upstream_commit was newer than that base, as for melonds and easyrpg whose upstream is the standalone build they document. melonds read its Qt refs 825 commits back and reported 4 to review. A pin that descends from the base now keeps the HEAD, melonds shows 0 to review.
This commit is contained in:
1 parent
651cabf412
commit
f8dce8f8c3
2 files changed
+23
-2
No files matched your search
@@ -1257,6 +1257,14 @@ def _follow_fork_base(
|
||||
base = upstream.fork_base(
|
||||
view.repo, view.head, source.repo, source.head, cache_dir, offline
|
||||
)
|
||||
if base and base != view.pin:
|
||||
# A pin newer than the merge base names code the port does not
|
||||
# carry: the upstream is a build of its own, the Qt melonDS or the
|
||||
# EasyRPG Player a standalone + libretro profile documents, and
|
||||
# its HEAD stays the reference. melonds read 825 commits back.
|
||||
moved = upstream.ancestry(view.repo, base, view.pin, cache_dir, offline)
|
||||
if moved and moved[0] > 0 and moved[1] == 0:
|
||||
base = None
|
||||
followed.append(
|
||||
replace(view, head=base, origin=f"{view.origin}, fork base of {source.repo.slug}")
|
||||
if base else view
|
||||
|
||||
Reference in new issue
Block a user