Skip to main content

parse_git_source

Function parse_git_source 

Source
pub fn parse_git_source(source: &str) -> Result<GitSource>
Expand description

Parse a git file source URL into its components.

Supports:

  • https://github.com/user/repo.git — plain clone
  • https://github.com/user/repo.git@v2.1.0 — pin to tag
  • https://github.com/user/repo.git?ref=dev — track branch
  • https://github.com/user/repo.git//subdir — subdirectory
  • https://github.com/user/repo.git//subdir@v2.1.0 — subdir at tag
  • git@github.com:user/repo.git@v2.1.0 — SSH with tag