Files
git-tfs/GitTfs/Commands/Pull.cs
T
2010-02-08 15:23:50 -05:00

40 lines
992 B
C#

using System.Collections.Generic;
using System.ComponentModel;
using CommandLine.OptParse;
using Sep.Git.Tfs.Core;
using StructureMap;
namespace Sep.Git.Tfs.Commands
{
[Pluggable("pull")]
[Description("pull [options]")]
[RequiresValidGitRepository]
public class Pull : GitTfsCommand
{
#region GitTfsCommand Members
private readonly Fetch fetch;
private readonly Globals globals;
public IEnumerable<IOptionResults> ExtraOptions
{
get { return this.MakeNestedOptionResults(fetch); }
}
public Pull(Globals globals, Fetch fetch)
{
this.fetch = fetch;
this.globals = globals;
}
public int Run(IList<string> args)
{
var retVal = 0;
retVal = fetch.Run(new List<string>());
if (retVal == 0) globals.Repository.CommandNoisy("merge", "tfs/default");
return retVal;
}
#endregion
}
}