Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.6.0](https://github.com/tjtelan/git-url-parse-rs/compare/v0.5.3...v0.6.0) - 2025-09-18

### Added

- Add interoperable support for `url::Url` ([#74](https://github.com/tjtelan/git-url-parse-rs/pull/74))

### Other

- Remove lifetime from GitUrl ([#72](https://github.com/tjtelan/git-url-parse-rs/pull/72))

## [0.5.3](https://github.com/tjtelan/git-url-parse-rs/compare/v0.5.2...v0.5.3) - 2025-09-17

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "MIT"
name = "git-url-parse"
readme = "README.md"
repository = "https://github.com/tjtelan/git-url-parse-rs"
version = "0.5.3"
version = "0.6.0"
rust-version = "1.85"

[features]
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Parses url used by git (e.g. `git clone <url>`)
- 🏗️ Host provider info extraction
- Easy to implement trait [`GitProvider`](https://docs.rs/git-url-parse/latest/git_url_parse/types/provider/trait.GitProvider.html) for custom provider parsing
- Built-in support for multiple Git hosting providers
* [Generic](https://docs.rs/git-url-parse/latest/git_url_parse/types/provider/struct.GenericProvider.html) (`git@host:owner/repo.git` style urls)
* [GitLab](https://docs.rs/git-url-parse/latest/git_url_parse/types/provider/struct.GitLabProvider.html)
* [Azure DevOps](https://docs.rs/git-url-parse/latest/git_url_parse/types/provider/struct.AzureDevOpsProvider.html)
* [Generic](https://docs.rs/git-url-parse/latest/git_url_parse/types/provider/generic/struct.GenericProvider.html) (`git@host:owner/repo.git` style urls)
* [GitLab](https://docs.rs/git-url-parse/latest/git_url_parse/types/provider/gitlab/struct.GitLabProvider.html)
* [Azure DevOps](https://docs.rs/git-url-parse/latest/git_url_parse/types/provider/azure_devops/struct.AzureDevOpsProvider.html)

## Quick Example

Expand Down Expand Up @@ -58,7 +58,7 @@ fn main() -> Result<(), git_url_parse::GitUrlParseError> {
#[derive(Debug, Clone, PartialEq, Eq)]
struct CustomProvider;

impl GitProvider<GitUrl<'_>, GitUrlParseError> for CustomProvider {
impl GitProvider<GitUrl, GitUrlParseError> for CustomProvider {
fn from_git_url(_url: &GitUrl) -> Result<Self, GitUrlParseError> {
// Your custom provider parsing here
Ok(Self)
Expand Down Expand Up @@ -98,7 +98,12 @@ Enable for [serde](https://docs.rs/serde/latest/) `Serialize`/`Deserialize` on [
#### `url`
(**enabled by default**)

Uses [url](https://docs.rs/url/latest/) during parsing for full url validation
`GitUrl` parsing finishes with [url](https://docs.rs/url/latest/) during parsing for full url validation

[`GitUrl::parse_to_url`] will normalize an ssh-based url and return [`url::Url`](https://docs.rs/url/latest/url/struct.Url.html)

You can use `url::Url` with the built-in [`GitProvider`](https://docs.rs/git-url-parse/latest/git_url_parse/types/provider/trait.GitProvider.html) host parsers. See the `url_interop` tests for examples


<!-- cargo-rdme end -->

Expand Down