╭ changed ────────────╮ │src/search_commit.zig│ ╰─────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │368 var ancestry = try Ancestry.init(state, io, allocator, base, tip); │ │369 defer ancestry.deinit(); │ │370 │ │371 - // the walk is bracketed here because it may run twice │ │371 progress.report(repo_opts, io, progress_ctx_maybe, .{ .start = .{ .kind = .walking_commit, .estimated_total_items = 0 } });│ │373 - defer progress.report(repo_opts, io, progress_ctx_maybe, .{ .end = .walking_commit }); │ │372 try ancestry.finish(progress_ctx_maybe); │ │373 + progress.report(repo_opts, io, progress_ctx_maybe, .{ .end = .walking_commit }); │ │374 │ │376 - // timestamps only choose the walk's order, so a commit the base reached │ │377 - // can be passed before the tip turns out to reach it too. that can only │ │378 - // make a removal wrong, never an addition. a fast-forward removes │ │379 - // nothing, which the base tip picking up the tip's flag proves. anything │ │380 - // else is settled by walking until nothing is left to carry down. │ │375 + // the walk stops at the shared history, so it trusts timestamps: a │ │376 + // commit dated later than a descendant can be passed from the base │ │377 + // side before the tip turns out to reach it too, and its postings are │ │378 + // then dropped. settling that would mean walking the whole history. │ │379 + // a wrong addition only re-puts postings, so a fast-forward removes │ │380 + // nothing, which the base tip picking up the tip's flag proves. │ │381 const base_node = ancestry.nodes.get(ancestry.tips[0]) orelse unreachable; │ │382 const fast_forward = base_node.flags & Ancestry.two != 0; │ │383 - if (!fast_forward) { │ │384 - var candidates = false; │ │385 - var flagged = ancestry.nodes.valueIterator(); │ │386 - while (flagged.next()) |node| { │ │387 - if (node.flags & Ancestry.both == Ancestry.one) candidates = true; │ │388 - } │ │389 - if (candidates) while (try ancestry.step()) { │ │390 - progress.report(repo_opts, io, progress_ctx_maybe, .{ .complete_one = .walking_commit }); │ │391 - }; │ │392 - } │ │383 │ │384 var iter = ancestry.nodes.iterator(); │ │385 while (iter.next()) |entry| { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯