diff options
Diffstat (limited to 'asyncgit/src/sync/branch/mod.rs')
-rw-r--r-- | asyncgit/src/sync/branch/mod.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/asyncgit/src/sync/branch/mod.rs b/asyncgit/src/sync/branch/mod.rs index 4dbe89aa..02645cf5 100644 --- a/asyncgit/src/sync/branch/mod.rs +++ b/asyncgit/src/sync/branch/mod.rs @@ -5,13 +5,13 @@ pub mod merge_ff; pub mod merge_rebase; pub mod rename; -use super::{ - remotes::get_default_remote_in_repo, utils::bytes2string, - RepoPath, -}; +use super::{utils::bytes2string, RepoPath}; use crate::{ error::{Error, Result}, - sync::{repository::repo, utils::get_head_repo, CommitId}, + sync::{ + remotes::get_default_remote_for_push_in_repo, + repository::repo, utils::get_head_repo, CommitId, + }, }; use git2::{Branch, BranchType, Repository}; use scopetime::scope_time; @@ -209,7 +209,7 @@ pub struct BranchCompare { } /// -pub(crate) fn branch_set_upstream( +pub(crate) fn branch_set_upstream_after_push( repo: &Repository, branch_name: &str, ) -> Result<()> { @@ -219,7 +219,7 @@ pub(crate) fn branch_set_upstream( repo.find_branch(branch_name, BranchType::Local)?; if branch.upstream().is_err() { - let remote = get_default_remote_in_repo(repo)?; + let remote = get_default_remote_for_push_in_repo(repo)?; let upstream_name = format!("{remote}/{branch_name}"); branch.set_upstream(Some(upstream_name.as_str()))?; } |