cli: Remove dead `fn parse_remote`
This commit is contained in:
parent
53cb8da8ff
commit
d860ec15b3
|
|
@ -345,14 +345,6 @@ pub fn check_version() -> Result<Version, anyhow::Error> {
|
||||||
Ok(git_version)
|
Ok(git_version)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Parse a remote refspec into a peer id and ref.
|
|
||||||
pub fn parse_remote(refspec: &str) -> Option<(NodeId, &str)> {
|
|
||||||
refspec
|
|
||||||
.strip_prefix("refs/remotes/")
|
|
||||||
.and_then(|s| s.split_once('/'))
|
|
||||||
.and_then(|(peer, r)| NodeId::from_str(peer).ok().map(|p| (p, r)))
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn add_tag(
|
pub fn add_tag(
|
||||||
repo: &Repository,
|
repo: &Repository,
|
||||||
message: &str,
|
message: &str,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue