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; }
/// <summary> /// Create a new pack receive for an open repository. /// </summary> /// <param name="into">the destination repository.</param> public ReceivePack(Repository into) { db = into; walk = new RevWalk.RevWalk(db); ReceiveConfig cfg = db.Config.get(ReceiveConfig.KEY); checkReceivedObjects = cfg._checkReceivedObjects; allowCreates = cfg._allowCreates; allowDeletes = cfg._allowDeletes; allowNonFastForwards = cfg._allowNonFastForwards; allowOfsDelta = cfg._allowOfsDelta; refFilter = RefFilterContants.DEFAULT; preReceive = PreReceiveHook.NULL; postReceive = PostReceiveHook.NULL; }
public void setPostReceiveHook(IPostReceiveHook h) { postReceive = h ?? PostReceiveHook.NULL; }