fix: allow both head and base on Remote.Resolved
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA
Description
After creating a MR using glab, it started prompting for base repo on every command. After investigating, I saw that it added glab-resolved = head to my .git/config which already had glab-resolved = base.
As Remote.Resolved is set in a loop, only the last one was kept, so if base was first, it caused the aforementioned issue.
Related Issues
Resolves #7594 (closed)
How has this been tested?
Added tests for cases where head and base are set for the same repo, or different repos.
Also tested manually.
Screenshots (if appropriate):
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap
Edited by 🤖 GitLab Bot 🤖