╭ changed ──────────╮ │src/event/Patch.zig│ ╰───────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────╮ │ 4 const xit = @import("xit");│ │ 5 const rp = xit.repo; │ │ 6 const hash = xit.hash; │ │ 7 +const rf = xit.ref; │ │ 8 │ │ 9 title: []const u8, │ │10 description: []const u8, │ ╰───────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │34 std.mem.eql(u8, record.event.source_oid, self.source_oid) and │ │35 std.mem.eql(u8, record.event.target_ref, self.target_ref); │ │36 } │ │37 + │ │38 + pub fn targetBranch(self: Revision) ?[]const u8 { │ │39 + const target_ref = rf.Ref.initFromPath(self.target_ref, null) orelse return null;│ │40 + return switch (target_ref.kind) { │ │41 + .head => target_ref.name, │ │42 + else => null, │ │43 + }; │ │44 + } │ │45 }; │ │46 │ │47 pub const Record = struct { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯