feature: add an option in repository configuration to enable --prune on fetch (#590)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-10-30 18:39:38 +08:00
parent a4befd010a
commit 3cbffa6ff9
No known key found for this signature in database
12 changed files with 50 additions and 11 deletions

View file

@ -4,7 +4,7 @@ namespace SourceGit.Commands
{
public class Pull : Command
{
public Pull(string repo, string remote, string branch, bool useRebase, bool noTags, Action<string> outputHandler)
public Pull(string repo, string remote, string branch, bool useRebase, bool noTags, bool prune, Action<string> outputHandler)
{
_outputHandler = outputHandler;
WorkingDirectory = repo;
@ -17,6 +17,8 @@ namespace SourceGit.Commands
Args += "--rebase ";
if (noTags)
Args += "--no-tags ";
if (prune)
Args += "--prune ";
Args += $"{remote} {branch}";
}