╭ changed ──╮ │src/try.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │333 try template_repo.add(io, allocator, &.{ "README.md", "docs/dev/contribute.md" });│ │334 _ = try template_repo.commit(io, allocator, .{ .message = "let there be light" });│ │335 │ │336 - // tag every commit in creation order as v1, v2, and so on │ │336 + // tag every commit in creation order, three versions at a time │ │337 var tag_num: usize = 1; │ │338 - try addNextTag(&template_repo, io, allocator, &tag_num); │ │338 + try addNextTags(&template_repo, io, allocator, &tag_num); │ │339 │ │340 // a batch of commits so the commits tab has more than one page to │ │341 // paginate through. each rewrites a few files with scattered line │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │387 } │ │388 const message = try arena.allocator().dupe(u8, msg_writer.written()); │ │389 _ = try template_repo.commit(io, allocator, .{ .message = message, .timestamp = base_ts + c * std.time.s_per_day });│ │390 - try addNextTag(&template_repo, io, allocator, &tag_num); │ │390 + try addNextTags(&template_repo, io, allocator, &tag_num); │ │391 } │ │392 │ │393 // two more branches forked off master, each adding a single commit │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │418 } │ │419 try template_repo.add(io, allocator, &.{b.file}); │ │420 _ = try template_repo.commit(io, allocator, .{ .message = b.message, .timestamp = base_ts + b.rev * std.time.s_per_day }); │ │421 - try addNextTag(&template_repo, io, allocator, &tag_num); │ │421 + try addNextTags(&template_repo, io, allocator, &tag_num); │ │422 │ │423 { │ │424 var to_master = try template_repo.switchDir(io, allocator, .{ .target = .{ .ref = .{ .kind = .head, .name = "master" } } });│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 997 return writer.toOwnedSlice(); │ │ 998 } │ │ 999 │ │1000 -// tag the current HEAD as the next sequential version: v1, v2, and so on │ │1001 -fn addNextTag(repo: *rp.Repo(.xit, .{}), io: std.Io, allocator: std.mem.Allocator, n: *usize) !void { │ │1002 - var buf: [16]u8 = undefined; │ │1003 - const name = try std.fmt.bufPrint(&buf, "v{d}", .{n.*}); │ │1004 - _ = try repo.addTag(io, allocator, .{ .name = name }); │ │1005 - n.* += 1; │ │1000 +// tag the current HEAD with the next three sequential versions, so the refs │ │1001 +// tab has enough tags to page through │ │1002 +fn addNextTags(repo: *rp.Repo(.xit, .{}), io: std.Io, allocator: std.mem.Allocator, n: *usize) !void {│ │1003 + for (0..3) |_| { │ │1004 + var buf: [16]u8 = undefined; │ │1005 + const name = try std.fmt.bufPrint(&buf, "v{d}", .{n.*}); │ │1006 + _ = try repo.addTag(io, allocator, .{ .name = name }); │ │1007 + n.* += 1; │ │1008 + } │ │1009 } │ │1010 │ │1011 fn commitTree( │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯