Merge pull request #3212 from gitbutlerapp/and-force-push-support-in-gitbutler-git

add force push support in gitbutler-git
This commit is contained in:
Josh Junon 2024-03-19 12:28:05 +01:00 committed by GitHub
commit 1bd3fad3f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -298,6 +298,7 @@ pub async fn push<P, F, Fut, E>(
executor: E,
remote: &str,
refspec: RefSpec,
force: bool,
on_prompt: F,
) -> Result<(), crate::Error<Error<E>>>
where
@ -313,6 +314,10 @@ where
args.push(remote);
args.push(&refspec);
if force {
args.push("--force");
}
let (status, stdout, stderr) =
execute_with_auth_harness(repo_path, executor, &args, None, on_prompt).await?;