mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-10 21:43:23 -05:00
feat: follow the branch a port was read from
This commit is contained in:
1 parent
87087c74f0
commit
2b7c5f9a64
5 files changed
+503
-124
No files matched your search
@@ -687,6 +687,9 @@ def select_views(
|
||||
"""
|
||||
views: list[RepoView] = []
|
||||
seen: set[tuple[str, str]] = set()
|
||||
# A port living on a branch of a fork is absent from the default tip, so
|
||||
# the branch it was read from is followed when the profile names one.
|
||||
branch = str(profile.get("source_branch") or "") or None
|
||||
for field in ("source", "upstream"):
|
||||
repo = upstream.parse_repo(str(profile.get(field) or ""))
|
||||
if repo is None or (repo.host, repo.slug) in seen:
|
||||
@@ -694,7 +697,9 @@ def select_views(
|
||||
pin, origin = resolve_pin(profile, repo, cache_dir, offline, field)
|
||||
if not pin:
|
||||
continue
|
||||
head = upstream.resolve_head(repo, cache_dir, offline)
|
||||
head = upstream.resolve_head(
|
||||
repo, cache_dir, offline, branch if field == "source" else None
|
||||
)
|
||||
if not head:
|
||||
continue
|
||||
seen.add((repo.host, repo.slug))
|
||||
|
||||
Reference in new issue
Block a user