mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 20:54:59 +00:00
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:
parent
c1c743f2ff
commit
153a1f30b2
9 changed files with 26 additions and 7 deletions
|
@ -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 ";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue