Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 37 lines (32 sloc) 1.127 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using CommandLine.OptParse;
using StructureMap;

namespace Sep.Git.Tfs.Commands
{
[Pluggable("quick-clone")]
[Description("quick-clone [options] tfs-url repository-path <git-repository-path>")]
    public class QuickClone : GitTfsCommand
    {
        private readonly Globals _globals;
        private readonly Init _init;

        public QuickClone(Globals globals, Init init)
        {
            _globals = globals;
            _init = init;
        }

        public IEnumerable<IOptionResults> ExtraOptions
        {
            get { return this.MakeNestedOptionResults(_init); }
        }

        public int Run(IList<string> args)
        {
            var retVal = 0;
            retVal = _init.Run(Clone.DeriveRepositoryDirectory(args));
            //if (retVal == 0) retVal = fetch.Run(new List<string>());
            if (retVal == 0) _globals.Repository.CommandNoisy("merge", _globals.Repository.ReadAllTfsRemotes().First().RemoteRef);
            return retVal;
        }
    }
}
Something went wrong with that request. Please try again.