git: Fix pull failing when tracking remote with different branch name (#41768)
Closes #31430 Release Notes: - Fixed git pull failing when tracking remote with different branch name Here's a before/after comparison when `dev` branch has upstream set to `origin/main`: https://github.com/user-attachments/assets/3a47e736-c7b7-4634-8cd1-aca7300c3a73
This commit is contained in:
@@ -531,7 +531,7 @@ pub trait GitRepository: Send + Sync {
|
||||
|
||||
fn pull(
|
||||
&self,
|
||||
branch_name: String,
|
||||
branch_name: Option<String>,
|
||||
upstream_name: String,
|
||||
rebase: bool,
|
||||
askpass: AskPassDelegate,
|
||||
@@ -1689,7 +1689,7 @@ impl GitRepository for RealGitRepository {
|
||||
|
||||
fn pull(
|
||||
&self,
|
||||
branch_name: String,
|
||||
branch_name: Option<String>,
|
||||
remote_name: String,
|
||||
rebase: bool,
|
||||
ask_pass: AskPassDelegate,
|
||||
@@ -1713,7 +1713,7 @@ impl GitRepository for RealGitRepository {
|
||||
|
||||
command
|
||||
.arg(remote_name)
|
||||
.arg(branch_name)
|
||||
.args(branch_name)
|
||||
.stdout(smol::process::Stdio::piped())
|
||||
.stderr(smol::process::Stdio::piped());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user