Beispiel #1
0
 /// <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;
 }
Beispiel #2
0
		/// <summary>Set the filter used while advertising the refs to the client.</summary>
		/// <remarks>
		/// Set the filter used while advertising the refs to the client.
		/// <p>
		/// Only refs allowed by this filter will be sent to the client.
		/// The filter is run against the refs specified by the
		/// <see cref="AdvertiseRefsHook">AdvertiseRefsHook</see>
		/// (if applicable).
		/// </remarks>
		/// <param name="refFilter">the filter; may be null to show all refs.</param>
		public virtual void SetRefFilter(RefFilter refFilter)
		{
			this.refFilter = refFilter != null ? refFilter : RefFilter.DEFAULT;
		}
Beispiel #3
0
 /// <summary>Set the filter used while advertising the refs to the client.</summary>
 /// <remarks>
 /// Set the filter used while advertising the refs to the client.
 /// <p>
 /// Only refs allowed by this filter will be sent to the client. This can
 /// be used by a server to restrict the list of references the client can
 /// obtain through clone or fetch, effectively limiting the access to only
 /// certain refs.
 /// </remarks>
 /// <param name="refFilter">the filter; may be null to show all refs.</param>
 public virtual void SetRefFilter(RefFilter refFilter)
 {
     this.refFilter = refFilter != null ? refFilter : RefFilter.DEFAULT;
 }
Beispiel #4
0
		/// <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);
			ADVERTISED = walk.NewFlag("ADVERTISED");
			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(ADVERTISED);
			SAVE.AddItem(WANT);
			SAVE.AddItem(PEER_HAS);
			refFilter = RefFilter.DEFAULT;
		}