Skip to content

Add HTTP/HTTPS clone URL parsing support - #86

Merged
Boomatang merged 1 commit into
mainfrom
85-http_clone_support
Aug 1, 2026
Merged

Add HTTP/HTTPS clone URL parsing support#86
Boomatang merged 1 commit into
mainfrom
85-http_clone_support

Conversation

@Boomatang

Copy link
Copy Markdown
Owner

Closes #85

The URL parser now supports http:// and https:// clone URLs in addition to the existing SSH (git@ and ssh://git@) formats. The presence of an @ symbol is used to distinguish SSH from HTTP URLs, then protocol-appropriate delimiters handle the rest of the parsing.

The .git suffix detection was also improved by using findLast instead of find, correctly handling project names that contain .git (e.g., .github).

Acceptance Criteria

The issue requires HTTP clone support that works for both GitHub and Codeberg repos.

  • GitHub: Tested with https://github.com/Boomatang/git-grab.git -- correctly parses site (github.com), owner (Boomatang), and name (git-grab).
  • Codeberg: Tested with http://codeberg.org/boomatang/boomatang.git -- correctly parses site (codeberg.org), owner (boomatang), and name (boomatang).
  • All existing SSH-based tests continue to pass, confirming no regressions.

Test Plan

  • Added test for GitHub HTTPS URL parsing
  • Added test for Codeberg HTTP URL parsing
  • Added test for SSH URL with a short domain (gogs.io)
  • Added test for project names containing .git (.github.git)
  • All existing tests pass

Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
@Boomatang
Boomatang merged commit 1abd9df into main Aug 1, 2026
2 checks passed
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.

http clone support

1 participant