git: Check push config before falling back to branch remote (#41700)

Closes #26649

Release Notes:

- Improved git support for remotes handling. Git will now check pushRemote and pushDefault configurations before
falling back to branch remote.

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
This commit is contained in:
Mayank Verma
2025-11-28 11:47:21 +00:00
committed by GitHub
co-authored by Jakub Konka
parent d877e562ab
commit 87e3d6e014
5 changed files with 87 additions and 23 deletions
+9 -1
View File
@@ -575,7 +575,15 @@ impl GitRepository for FakeGitRepository {
unimplemented!()
}
fn get_remotes(&self, _branch: Option<String>) -> BoxFuture<'_, Result<Vec<Remote>>> {
fn get_push_remote(&self, _branch: String) -> BoxFuture<'_, Result<Option<Remote>>> {
unimplemented!()
}
fn get_branch_remote(&self, _branch: String) -> BoxFuture<'_, Result<Option<Remote>>> {
unimplemented!()
}
fn get_all_remotes(&self) -> BoxFuture<'_, Result<Vec<Remote>>> {
unimplemented!()
}