From 88fb623efa28c346a655aa0fb798a88a78fafcb6 Mon Sep 17 00:00:00 2001 From: Tymoteusz Makowski Date: Mon, 26 May 2025 09:26:45 +0200 Subject: [PATCH] Display the correct git push flag when force-pushing (#30818) When I force pushed via the Git panel and noticed that `git push --force` command got logged at the bottom. I wanted to add an option to use `--force-with-lease` instead. However, upon investigation, it seems `--force-with-lease` is already being used for the executed command: https://github.com/zed-industries/zed/blob/5112fcebeb365fab385b90b0954fe0bcb338ce63/crates/git/src/repository.rs#L1100 And there is a mismatch with the displayed message: https://github.com/zed-industries/zed/blob/5112fcebeb365fab385b90b0954fe0bcb338ce63/crates/project/src/git_store.rs#L3555 Release Notes: - Fixed the displayed flag name when force pushing --- crates/project/src/git_store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/project/src/git_store.rs b/crates/project/src/git_store.rs index e9eadc217d..8c8d2e232f 100644 --- a/crates/project/src/git_store.rs +++ b/crates/project/src/git_store.rs @@ -3549,7 +3549,7 @@ impl Repository { let args = options .map(|option| match option { PushOptions::SetUpstream => " --set-upstream", - PushOptions::Force => " --force", + PushOptions::Force => " --force-with-lease", }) .unwrap_or("");