summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.rs25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/main.rs b/src/main.rs
index f43252a..7e881ee 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -256,28 +256,3 @@ async fn readline(msg: &str) -> eyre::Result<String> {
.await?
}
-async fn get_remotes() -> eyre::Result<Vec<(String, Url)>> {
- let repo = git2::Repository::open(".")?;
- let remotes = repo
- .remotes()?
- .iter()
- .filter_map(|name| {
- let name = name?.to_string();
- let url = Url::parse(repo.find_remote(&name).ok()?.url()?).ok()?;
- Some((name, url))
- })
- .collect::<Vec<_>>();
- Ok(remotes)
-}
-
-async fn get_remote(remotes: &[(String, Url)]) -> eyre::Result<Url> {
- let url = if remotes.len() == 1 {
- remotes[0].1.clone()
- } else if let Some((_, url)) = remotes.iter().find(|(name, _)| *name == "origin") {
- url.clone()
- } else {
- bail!("could not find remote");
- };
- Ok(url)
-}
-