Skip to content

refactor: extract RepoPathFromURL to deduplicate Git URL normalization#143

Merged
alecthomas merged 1 commit intomainfrom
aat/repo-path-from-url
Feb 23, 2026
Merged

refactor: extract RepoPathFromURL to deduplicate Git URL normalization#143
alecthomas merged 1 commit intomainfrom
aat/repo-path-from-url

Conversation

@alecthomas
Copy link
Copy Markdown
Collaborator

Three functions (clonePathForURL, spoolDirForURL, snapshotDirForURL)
duplicated the same url.Parse + TrimSuffix(".git") + filepath.Join
pattern. Extract a shared gitclone.RepoPathFromURL primitive and
propagate parse errors instead of silently falling back to "unknown".

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Three functions (clonePathForURL, spoolDirForURL, snapshotDirForURL)
duplicated the same url.Parse + TrimSuffix(".git") + filepath.Join
pattern. Extract a shared gitclone.RepoPathFromURL primitive and
propagate parse errors instead of silently falling back to "unknown".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@alecthomas alecthomas requested a review from a team as a code owner February 23, 2026 00:52
@alecthomas alecthomas requested review from nssherpa and removed request for a team February 23, 2026 00:52
@alecthomas alecthomas enabled auto-merge (squash) February 23, 2026 00:52
@alecthomas alecthomas merged commit 436309b into main Feb 23, 2026
5 checks passed
@alecthomas alecthomas deleted the aat/repo-path-from-url branch February 23, 2026 00:54
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.

1 participant