/// <exception cref="System.IO.IOException"></exception>
        private void ReceivePack(ProgressMonitor monitor)
        {
            OnReceivePack();
            InputStream input = @in;

            if (sideband)
            {
                input = new SideBandInputStream(input, monitor, GetMessageWriter());
            }
            ObjectInserter ins = local.NewObjectInserter();

            try
            {
                PackParser parser = ins.NewPackParser(input);
                parser.SetAllowThin(thinPack);
                parser.SetObjectChecking(transport.IsCheckFetchedObjects());
                parser.SetLockMessage(lockMessage);
                packLock = parser.Parse(monitor);
                ins.Flush();
            }
            finally
            {
                ins.Release();
            }
        }
Beispiel #2
0
        private string EnableCapabilities(ProgressMonitor monitor)
        {
            StringBuilder line = new StringBuilder();

            capableReport     = WantCapability(line, CAPABILITY_REPORT_STATUS);
            capableDeleteRefs = WantCapability(line, CAPABILITY_DELETE_REFS);
            capableOfsDelta   = WantCapability(line, CAPABILITY_OFS_DELTA);
            capableSideBand   = WantCapability(line, CAPABILITY_SIDE_BAND_64K);
            if (capableSideBand)
            {
                @in   = new SideBandInputStream(@in, monitor, GetMessageWriter());
                pckIn = new PacketLineIn(@in);
            }
            if (line.Length > 0)
            {
                Sharpen.Runtime.SetCharAt(line, 0, '\0');
            }
            return(line.ToString());
        }
		private string EnableCapabilities(ProgressMonitor monitor)
		{
			StringBuilder line = new StringBuilder();
			capableReport = WantCapability(line, CAPABILITY_REPORT_STATUS);
			capableDeleteRefs = WantCapability(line, CAPABILITY_DELETE_REFS);
			capableOfsDelta = WantCapability(line, CAPABILITY_OFS_DELTA);
			capableSideBand = WantCapability(line, CAPABILITY_SIDE_BAND_64K);
			if (capableSideBand)
			{
				@in = new SideBandInputStream(@in, monitor, GetMessageWriter());
				pckIn = new PacketLineIn(@in);
			}
			if (line.Length > 0)
			{
				Sharpen.Runtime.SetCharAt(line, 0, '\0');
			}
			return line.ToString();
		}