Module git

Module git 

Source

Structs§

ParsedGitUrl
Represents the components of a parsed GitHub folder URL.

Functions§

download_directory_via_api
Downloads a directory’s contents from the GitHub API into a temporary directory. This is much faster than a full git clone for large repositories.
get_repo
Public-facing function to get a repo, using the system’s standard cache directory.
is_git_url
Checks if a given string is a likely git repository URL.
parse_github_folder_url
Parses a GitHub folder URL into its constituent parts. Handles the official format (.../tree/branch/path) as well as common “sloppy” formats like .../branch/path or just .../path (which assumes the default branch). Returns Some(ParsedGitUrl) if the URL is a parsable GitHub folder URL, otherwise None.