mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
feature: supports --no-tags
on fetch and pull operation (#226)
This commit is contained in:
parent
de1a4d14e8
commit
6dad466eef
10 changed files with 46 additions and 12 deletions
|
@ -7,7 +7,7 @@ namespace SourceGit.Commands
|
|||
{
|
||||
public class Fetch : Command
|
||||
{
|
||||
public Fetch(string repo, string remote, bool prune, Action<string> outputHandler)
|
||||
public Fetch(string repo, string remote, bool prune, bool noTags, Action<string> outputHandler)
|
||||
{
|
||||
_outputHandler = outputHandler;
|
||||
WorkingDirectory = repo;
|
||||
|
@ -24,9 +24,15 @@ namespace SourceGit.Commands
|
|||
Args = "-c credential.helper=manager ";
|
||||
}
|
||||
|
||||
Args += "fetch --force --progress --verbose ";
|
||||
Args += "fetch --progress --verbose ";
|
||||
if (prune)
|
||||
Args += "--prune ";
|
||||
|
||||
if (noTags)
|
||||
Args += "--no-tags ";
|
||||
else
|
||||
Args += "--force ";
|
||||
|
||||
Args += remote;
|
||||
|
||||
AutoFetch.MarkFetched(repo);
|
||||
|
@ -132,7 +138,7 @@ namespace SourceGit.Commands
|
|||
{
|
||||
var job = new Job
|
||||
{
|
||||
Cmd = new Fetch(repo, "--all", true, null) { RaiseError = false },
|
||||
Cmd = new Fetch(repo, "--all", true, false, null) { RaiseError = false },
|
||||
NextRunTimepoint = DateTime.Now.AddMinutes(Convert.ToDouble(Interval)),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue