Ejemplo n.º 1
0
        public ReceivePack(Repository into)
        {
            db   = into;
            walk = new RevWalk.RevWalk(db);

            RepositoryConfig cfg = db.Config;

            checkReceivedObjects = cfg.getBoolean("receive", "fsckobjects", false);
            allowCreates         = true;
            allowDeletes         = !cfg.getBoolean("receive", "denydeletes", false);
            allowNonFastForwards = !cfg.getBoolean("receive", "denynonfastforwards", false);
            allowOfsDelta        = cfg.getBoolean("repack", "usedeltabaseoffset", true);
            preReceive           = PreReceiveHook.NULL;
            postReceive          = PostReceiveHook.NULL;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Update properties by setting fields from the configuration.
 /// <para />
 /// If a property is not defined in the configuration, then it is left
 /// unmodified.
 /// </summary>
 /// <param name="rc">Configuration to read properties from.</param>
 public void FromConfig(RepositoryConfig rc)
 {
     PackedGitOpenFiles  = rc.getInt("core", null, "packedgitopenfiles", PackedGitOpenFiles);
     PackedGitLimit      = rc.getLong("core", null, "packedgitlimit", PackedGitLimit);
     PackedGitWindowSize = rc.getInt("core", null, "packedgitwindowsize", PackedGitWindowSize);
     PackedGitMMAP       = rc.getBoolean("core", null, "packedgitmmap", PackedGitMMAP);
     DeltaBaseCacheLimit = rc.getInt("core", null, "deltabasecachelimit", DeltaBaseCacheLimit);
 }
Ejemplo n.º 3
0
        public BasePackFetchConnection(IPackTransport packTransport)
            : base(packTransport)
        {
            RepositoryConfig cfg = local.Config;

            _includeTags   = transport.TagOpt != TagOpt.NO_TAGS;
            _thinPack      = transport.FetchThin;
            _allowOfsDelta = cfg.getBoolean("repack", "usedeltabaseoffset", true);

            _walk             = new RevWalk.RevWalk(local);
            _reachableCommits = new RevCommitList <RevCommit>();
            REACHABLE         = _walk.newFlag("REACHABLE");
            COMMON            = _walk.newFlag("COMMON");
            ADVERTISED        = _walk.newFlag("ADVERTISED");

            _walk.carry(COMMON);
            _walk.carry(REACHABLE);
            _walk.carry(ADVERTISED);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Update properties by setting fields from the configuration.
 /// <para />
 /// If a property is not defined in the configuration, then it is left
 /// unmodified.
 /// </summary>
 /// <param name="rc">Configuration to read properties from.</param>
 public void FromConfig(RepositoryConfig rc)
 {
     PackedGitOpenFiles = rc.getInt("core", null, "packedgitopenfiles", PackedGitOpenFiles);
     PackedGitLimit = rc.getInt("core", null, "packedgitlimit", PackedGitLimit);
     PackedGitWindowSize = rc.getInt("core", null, "packedgitwindowsize", PackedGitWindowSize);
     PackedGitMMAP = rc.getBoolean("core", null, "packedgitmmap", PackedGitMMAP);
     DeltaBaseCacheLimit = rc.getInt("core", null, "deltabasecachelimit", DeltaBaseCacheLimit);
 }