Exemplo n.º 1
0
		/// <summary>Configure the checker used to validate received objects.</summary>
		/// <remarks>
		/// Configure the checker used to validate received objects.
		/// <p>
		/// Usually object checking isn't necessary, as Git implementations only
		/// create valid objects in pack files. However, additional checking may be
		/// useful if processing data from an untrusted source.
		/// </remarks>
		/// <param name="oc">the checker instance; null to disable object checking.</param>
		public virtual void SetObjectChecker(ObjectChecker oc)
		{
			objCheck = oc;
		}
Exemplo n.º 2
0
		public virtual void SetUp()
		{
			checker = new ObjectChecker();
		}
Exemplo n.º 3
0
		internal WalkFetchConnection(WalkTransport t, WalkRemoteObjectDatabase w)
		{
			NGit.Transport.Transport wt = (NGit.Transport.Transport)t;
			local = wt.local;
			objCheck = wt.IsCheckFetchedObjects() ? new ObjectChecker() : null;
			inserter = local.NewObjectInserter();
			reader = local.NewObjectReader();
			remotes = new AList<WalkRemoteObjectDatabase>();
			remotes.AddItem(w);
			unfetchedPacks = new List<WalkFetchConnection.RemotePack>();
			packsConsidered = new HashSet<string>();
			noPacksYet = new List<WalkRemoteObjectDatabase>();
			noPacksYet.AddItem(w);
			noAlternatesYet = new List<WalkRemoteObjectDatabase>();
			noAlternatesYet.AddItem(w);
			fetchErrors = new Dictionary<ObjectId, IList<Exception>>();
			packLocks = new AList<PackLock>(4);
			revWalk = new RevWalk(reader);
			revWalk.SetRetainBody(false);
			treeWalk = new TreeWalk(reader);
			COMPLETE = revWalk.NewFlag("COMPLETE");
			IN_WORK_QUEUE = revWalk.NewFlag("IN_WORK_QUEUE");
			LOCALLY_SEEN = revWalk.NewFlag("LOCALLY_SEEN");
			localCommitQueue = new DateRevQueue();
			workQueue = new List<ObjectId>();
		}