beads/internal/doltremote
matt wilkie 02c6c2d433
fix(doltremote): fold host case, strip creds, recognize user-less SCP in CanonicalForComparison (#4576)
* fix(doltremote): fold host case, strip creds, recognize user-less SCP in CanonicalForComparison

Closes false negatives in the git-origin collision guard / bd doctor remotes
check: host case now folded, embedded user[:pass]@ credentials stripped, and
user-less SCP form host:path recognized. http vs https kept distinct.

mybd-ootd. Follow-up to gastownhall/beads#4153.

Agent-Signature: claude-opus-4-8-high on behalf of matt wilkie

* fix(doltremote): preserve non-default SSH users in canonical comparison

CanonicalForComparison stripped any user@ prefix from an SSH authority
the same way it strips HTTP(S) transport credentials, so distinct
remotes like alice@example.com:repo.git and bob@example.com:repo.git
canonicalized to the same string. SSH userinfo selects the remote
account/home directory, not a credential, so it is now preserved
except for the conventional "git" user, which git hosts treat as the
default and which the userless-SCP form already folds against.

Also documents the accepted P3 trade-off (dotless SCP host aliases
like "github:org/repo.git" are not recognized as SCP-style, since the
dot-in-host heuristic is what distinguishes a hostname from a Windows
drive letter) as a code comment rather than a behavior change.

Addresses Codex cross-vendor review finding (2026-07-07) on PR #4576
(tracking: mybd-ycu4).

Agent-Signature: claude-fable-5-high on behalf of matt wilkie
2026-07-07 12:59:18 -07:00
..
remote.go fix(doltremote): fold host case, strip creds, recognize user-less SCP in CanonicalForComparison (#4576) 2026-07-07 12:59:18 -07:00