Loading
Report correct missing merge base ref
Summary
Fixes incorrect missing-ref reporting in the repository merge_base API when a missing ref precedes an existing ref.
Why
ListCommitsByOid omits missing refs. Zipping its result with the original refs shifts the positional mapping, so the API can report the last existing ref as missing.
What does this MR do?
Uses ListCommitsByRefName, which preserves the ref_name => commit mapping in a single Gitaly lookup. Unknown refs are determined by key presence, and resolved commit IDs are passed to merge_base.
Adds a regression test with the missing ref before an existing ref.
How to test
Run the relevant RSpec examples for the repository merge-base API.
Ruby syntax checks pass locally. Full RSpec was not run locally because of the sparse checkout.