mirror of
https://github.com/flatpak/flatpak.git
synced 2026-06-12 10:37:50 -04:00
As described in the last commit message, it makes sense to move toward using flatpak_repo_resolve_rev() rather than ostree_repo_resolve_rev() for a few reasons: 1) It means we can use OSTREE_REPO_PULL_FLAGS_MIRROR which causes refs to be pulled into repo/refs/mirrors/ rather than repo/refs/remotes/ which fixes a few edge cases of using collection IDs[1] 2) It falls back to using ostree_repo_resolve_rev() if ostree_repo_resolve_collection_ref() fails so we can maintain backwards compatibility for repo/refs/remotes/ 3) It distinguishes between remote and local refs, and in the local case uses OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY and ostree_repo_resolve_rev_ext() to make sure we don't for example accidentally use a remote's repo metadata rather than the local repo's metadata for the "flatpak repo" command. So this commit changes every instance of ostree_repo_resolve_rev() in the codebase to flatpak_repo_resolve_rev(). [1] https://github.com/flatpak/flatpak/issues/1832 Closes: #2705 Approved by: alexlarsson