private List<ReceiveCommand> makeStageList(Repository git, ObjectInserter inserter) throws IOException { // For each branch, collapse consecutive updates to only most recent, // avoiding sending multiple objects in a rapid fast-forward chain, or // rewritten content. Map<String, ObjectId> byRef = new HashMap<>(); for (Proposal p : todo) { for (Command c : p.getCommands()) { Ref n = c.getNewRef(); if (n != null && !n.isSymbolic()) { byRef.put(n.getName(), n.getObjectId()); } } } if (byRef.isEmpty()) { return Collections.emptyList(); } Set<ObjectId> newObjs = new HashSet<>(byRef.values()); StageBuilder b = new StageBuilder( leader.getSystem().getTxnStage(), acceptedNewIndex); return b.makeStageList(newObjs, git, inserter); }
initialize(); for (Proposal p : queued) { refTree.apply(p.getCommands()); if (!refTree.apply(proposal.getCommands())) {
if (!tree.apply(p.getCommands())) {
private List<ReceiveCommand> makeStageList(Repository git, ObjectInserter inserter) throws IOException { // For each branch, collapse consecutive updates to only most recent, // avoiding sending multiple objects in a rapid fast-forward chain, or // rewritten content. Map<String, ObjectId> byRef = new HashMap<>(); for (Proposal p : todo) { for (Command c : p.getCommands()) { Ref n = c.getNewRef(); if (n != null && !n.isSymbolic()) { byRef.put(n.getName(), n.getObjectId()); } } } if (byRef.isEmpty()) { return Collections.emptyList(); } Set<ObjectId> newObjs = new HashSet<>(byRef.values()); StageBuilder b = new StageBuilder( leader.getSystem().getTxnStage(), acceptedNewIndex); return b.makeStageList(newObjs, git, inserter); }
private List<ReceiveCommand> makeStageList(Repository git, ObjectInserter inserter) throws IOException { // For each branch, collapse consecutive updates to only most recent, // avoiding sending multiple objects in a rapid fast-forward chain, or // rewritten content. Map<String, ObjectId> byRef = new HashMap<>(); for (Proposal p : todo) { for (Command c : p.getCommands()) { Ref n = c.getNewRef(); if (n != null && !n.isSymbolic()) { byRef.put(n.getName(), n.getObjectId()); } } } if (byRef.isEmpty()) { return Collections.emptyList(); } Set<ObjectId> newObjs = new HashSet<>(byRef.values()); StageBuilder b = new StageBuilder( leader.getSystem().getTxnStage(), acceptedNewIndex); return b.makeStageList(newObjs, git, inserter); }
initialize(); for (Proposal p : queued) { refTree.apply(p.getCommands()); if (!refTree.apply(proposal.getCommands())) {
initialize(); for (Proposal p : queued) { refTree.apply(p.getCommands()); if (!refTree.apply(proposal.getCommands())) {
if (!tree.apply(p.getCommands())) {
if (!tree.apply(p.getCommands())) {