/// <summary>Create a new connection to fetch using the native git transport.</summary> /// <remarks>Create a new connection to fetch using the native git transport.</remarks> /// <param name="packTransport">the transport.</param> internal BasePackFetchConnection(PackTransport packTransport) : base(packTransport ) { BasePackFetchConnection.FetchConfig cfg = local.GetConfig().Get(BasePackFetchConnection.FetchConfig .KEY); includeTags = transport.GetTagOpt() != TagOpt.NO_TAGS; thinPack = transport.IsFetchThin(); allowOfsDelta = cfg.allowOfsDelta; walk = new RevWalk(local); reachableCommits = new RevCommitList <RevCommit>(); REACHABLE = walk.NewFlag("REACHABLE"); COMMON = walk.NewFlag("COMMON"); STATE = walk.NewFlag("STATE"); ADVERTISED = walk.NewFlag("ADVERTISED"); walk.Carry(COMMON); walk.Carry(REACHABLE); walk.Carry(ADVERTISED); }
/// <summary>Create a new pack upload for an open repository.</summary> /// <remarks>Create a new pack upload for an open repository.</remarks> /// <param name="copyFrom">the source repository.</param> public UploadPack(Repository copyFrom) { db = copyFrom; walk = new RevWalk(db); walk.SetRetainBody(false); WANT = walk.NewFlag("WANT"); PEER_HAS = walk.NewFlag("PEER_HAS"); COMMON = walk.NewFlag("COMMON"); SATISFIED = walk.NewFlag("SATISFIED"); walk.Carry(PEER_HAS); SAVE = new RevFlagSet(); SAVE.AddItem(WANT); SAVE.AddItem(PEER_HAS); SAVE.AddItem(COMMON); SAVE.AddItem(SATISFIED); refFilter = RefFilter.DEFAULT; }
/// <summary>Create a new pack upload for an open repository.</summary> /// <remarks>Create a new pack upload for an open repository.</remarks> /// <param name="copyFrom">the source repository.</param> public UploadPack(Repository copyFrom) { db = copyFrom; walk = new RevWalk(db); walk.SetRetainBody(false); WANT = walk.NewFlag("WANT"); PEER_HAS = walk.NewFlag("PEER_HAS"); COMMON = walk.NewFlag("COMMON"); SATISFIED = walk.NewFlag("SATISFIED"); walk.Carry(PEER_HAS); SAVE = new RevFlagSet(); SAVE.AddItem(WANT); SAVE.AddItem(PEER_HAS); SAVE.AddItem(COMMON); SAVE.AddItem(SATISFIED); }