| ... | @@ -74,7 +74,7 @@ fn ensureObjId(comptime T: type, input: string) T { | ... | @@ -74,7 +74,7 @@ fn ensureObjId(comptime T: type, input: string) T { |
| 74 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects | 74 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects |
| 75 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles | 75 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles |
| 76 | pub fn getObject(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !string { | 76 | pub fn getObject(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !string { |
| 77 | const t = tracer.trace(@src(), "", .{}); | 77 | const t = tracer.trace(@src(), " {s}", .{obj}); |
| 78 | defer t.end(); | 78 | defer t.end(); |
| 79 | | 79 | |
| 80 | const result = try std.ChildProcess.exec(.{ | 80 | const result = try std.ChildProcess.exec(.{ |
| ... | @@ -92,7 +92,7 @@ pub fn getObject(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !string { | ... | @@ -92,7 +92,7 @@ pub fn getObject(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !string { |
| 92 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects | 92 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects |
| 93 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles | 93 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles |
| 94 | pub fn getObjectSize(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !u64 { | 94 | pub fn getObjectSize(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !u64 { |
| 95 | const t = tracer.trace(@src(), "", .{}); | 95 | const t = tracer.trace(@src(), " {s}", .{obj}); |
| 96 | defer t.end(); | 96 | defer t.end(); |
| 97 | | 97 | |
| 98 | const result = try std.ChildProcess.exec(.{ | 98 | const result = try std.ChildProcess.exec(.{ |
| ... | @@ -108,7 +108,7 @@ pub fn getObjectSize(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !u64 { | ... | @@ -108,7 +108,7 @@ pub fn getObjectSize(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !u64 { |
| 108 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects | 108 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects |
| 109 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles | 109 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles |
| 110 | pub fn isType(alloc: std.mem.Allocator, dir: std.fs.Dir, maybeobj: Id, typ: Tree.Object.Id.Tag) !?bool { | 110 | pub fn isType(alloc: std.mem.Allocator, dir: std.fs.Dir, maybeobj: Id, typ: Tree.Object.Id.Tag) !?bool { |
| 111 | const t = tracer.trace(@src(), "", .{}); | 111 | const t = tracer.trace(@src(), " {s} = {s} ?", .{ maybeobj, @tagName(typ) }); |
| 112 | defer t.end(); | 112 | defer t.end(); |
| 113 | | 113 | |
| 114 | const result = try std.ChildProcess.exec(.{ | 114 | const result = try std.ChildProcess.exec(.{ |
| ... | @@ -125,7 +125,7 @@ pub fn isType(alloc: std.mem.Allocator, dir: std.fs.Dir, maybeobj: Id, typ: Tree | ... | @@ -125,7 +125,7 @@ pub fn isType(alloc: std.mem.Allocator, dir: std.fs.Dir, maybeobj: Id, typ: Tree |
| 125 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects | 125 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects |
| 126 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles | 126 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles |
| 127 | pub fn getType(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !Tree.Object.Id.Tag { | 127 | pub fn getType(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !Tree.Object.Id.Tag { |
| 128 | const t = tracer.trace(@src(), "", .{}); | 128 | const t = tracer.trace(@src(), " {s}", .{obj}); |
| 129 | defer t.end(); | 129 | defer t.end(); |
| 130 | | 130 | |
| 131 | const result = try std.ChildProcess.exec(.{ | 131 | const result = try std.ChildProcess.exec(.{ |
| ... | @@ -144,7 +144,7 @@ pub fn getType(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !Tree.Object. | ... | @@ -144,7 +144,7 @@ pub fn getType(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !Tree.Object. |
| 144 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects | 144 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects |
| 145 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles | 145 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles |
| 146 | pub fn revList(alloc: std.mem.Allocator, dir: std.fs.Dir, comptime count: u31, from: CommitId, sub_path: string) !string { | 146 | pub fn revList(alloc: std.mem.Allocator, dir: std.fs.Dir, comptime count: u31, from: CommitId, sub_path: string) !string { |
| 147 | const t = tracer.trace(@src(), "", .{}); | 147 | const t = tracer.trace(@src(), "({d}) {s} -- {s}", .{ count, from.id, sub_path }); |
| 148 | defer t.end(); | 148 | defer t.end(); |
| 149 | | 149 | |
| 150 | const result = try std.ChildProcess.exec(.{ | 150 | const result = try std.ChildProcess.exec(.{ |