summaryrefslogtreecommitdiffstats
path: root/src/repo.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/repo.rs')
-rw-r--r--src/repo.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/repo.rs b/src/repo.rs
index 424470f..adfde12 100644
--- a/src/repo.rs
+++ b/src/repo.rs
@@ -78,7 +78,7 @@ impl RepoInfo {
let (remote_url, remote_repo_name) = {
let mut out = (None, None);
- if let Ok(local_repo) = git2::Repository::open(".") {
+ if let Ok(local_repo) = git2::Repository::discover(".") {
let mut name = remote.map(|s| s.to_owned());
// if there's only one remote, use that
@@ -557,7 +557,7 @@ pub async fn create_repo(
push: bool,
) -> eyre::Result<()> {
if remote.is_some() || push {
- let repo = git2::Repository::open(".")?;
+ let repo = git2::Repository::discover(".")?;
let upstream = remote.as_deref().unwrap_or("origin");
if repo.find_remote(upstream).is_ok() {
@@ -586,7 +586,7 @@ pub async fn create_repo(
println!("created new repo at {}", html_url);
if remote.is_some() || push {
- let repo = git2::Repository::open(".")?;
+ let repo = git2::Repository::discover(".")?;
let upstream = remote.as_deref().unwrap_or("origin");
let clone_url = new_repo