prefer push URL when detecting remote, cope with SSH forms #27
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
nagonag
nagonag/ignore
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
heiko/fj!27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/26-ssh-git-repo-urls"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #26.
Summary
Detect()now triesgit remote get-url --pushfirst; falls back tothe fetch URL if the push URL can't be parsed
--pushreturns the fetchURL, so the common case is unaffected
ssh://and SCP-style URLs without.gitsuffixNotes
API-time retry (if the derived HTTPS endpoint fails, retry with the
other URL) is out of scope here — that's a follow-up.
Test plan
go test ./internal/repo/...passes (all 7 URL parse cases)git remote set-url --push origin git@…),run
fj issues— should resolve correctlyPASS: go test ./... passed.
PASS: go test ./... passed.
PASS: go test ./... passed.
f153f2b8f3ef5b368901