Skip to content

Fix git url with ambiguous ref#382

Merged
CreatorHead merged 2 commits intohashicorp:mainfrom
nimasamii:fix-ambiguous-ref
Jan 14, 2026
Merged

Fix git url with ambiguous ref#382
CreatorHead merged 2 commits intohashicorp:mainfrom
nimasamii:fix-ambiguous-ref

Conversation

@nimasamii
Copy link
Contributor

Same fix as in pull request #251 but with added test case.

@hashicorp-cla
Copy link

hashicorp-cla commented Oct 5, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@CreatorHead CreatorHead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a minimal, surgical fix for handling ambiguous git references. The addition of -- to the git checkout command follows git best practices and prevents path/ref confusion when a reference could be interpreted as both a branch and tag.

The test case properly simulates the real-world scenario and confirms the fix resolves the issue without breaking existing workflows.

LGTM - Safe to merge. Well-tested fix for a legitimate edge case.

@CreatorHead CreatorHead merged commit fb4b9f0 into hashicorp:main Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants