feature: supports toggle --force option for git fetch command (#721)

* Background auto fetch will always disable this option
* This option is not add to pull operation

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-22 09:39:50 +08:00
parent c1c743f2ff
commit 153a1f30b2
No known key found for this signature in database
9 changed files with 26 additions and 7 deletions

View file

@ -4,7 +4,7 @@ namespace SourceGit.Commands
{
public class Fetch : Command
{
public Fetch(string repo, string remote, bool noTags, bool prune, Action<string> outputHandler)
public Fetch(string repo, string remote, bool noTags, bool prune, bool force, Action<string> outputHandler)
{
_outputHandler = outputHandler;
WorkingDirectory = repo;
@ -18,6 +18,9 @@ namespace SourceGit.Commands
else
Args += "--tags ";
if (force)
Args += "--force ";
if (prune)
Args += "--prune ";