diff --git a/GitTfs/Commands/Clone.cs b/GitTfs/Commands/Clone.cs index 8f4de86a..c04c1d47 100644 --- a/GitTfs/Commands/Clone.cs +++ b/GitTfs/Commands/Clone.cs @@ -11,14 +11,14 @@ namespace Sep.Git.Tfs.Commands [Description("clone [options] tfs-url repository-path ")] public class Clone : GitTfsCommand { - private readonly GitTfsCommand fetch; - private readonly GitTfsCommand init; + private readonly Fetch fetch; + private readonly Init init; private readonly Globals globals; - public Clone(Globals globals) + public Clone(Globals globals, Fetch fetch, Init init) { - fetch = ObjectFactory.GetNamedInstance("fetch"); - init = ObjectFactory.GetNamedInstance("init"); + this.fetch = fetch; + this.init = init; this.globals = globals; } diff --git a/GitTfs/Commands/Pull.cs b/GitTfs/Commands/Pull.cs index 636a693b..2abb83f4 100644 --- a/GitTfs/Commands/Pull.cs +++ b/GitTfs/Commands/Pull.cs @@ -12,7 +12,7 @@ namespace Sep.Git.Tfs.Commands public class Pull : GitTfsCommand { #region GitTfsCommand Members - private readonly GitTfsCommand fetch; + private readonly Fetch fetch; private readonly Globals globals; public IEnumerable ExtraOptions @@ -20,9 +20,9 @@ namespace Sep.Git.Tfs.Commands get { return this.MakeNestedOptionResults(fetch); } } - public Pull(Globals globals) + public Pull(Globals globals, Fetch fetch) { - fetch = ObjectFactory.GetNamedInstance("fetch"); + this.fetch = fetch; this.globals = globals; }