authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-04-11 03:22:05 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-04-11 03:22:05 -07:00
log4931e5f829b12ebdabb855f5a922d749a5d3ed42
tree13c546d469418b0a90ae83694e1260777df89265
parent036666d8e5f15a1289b49bb969eeff09563f8164

add more context to tracer calls


1 files changed, 5 insertions(+), 5 deletions(-)

git.zig+5-5
...@@ -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-Objects74// https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
75// https://git-scm.com/book/en/v2/Git-Internals-Packfiles75// https://git-scm.com/book/en/v2/Git-Internals-Packfiles
76pub fn getObject(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !string {76pub 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();
7979
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-Objects92// https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
93// https://git-scm.com/book/en/v2/Git-Internals-Packfiles93// https://git-scm.com/book/en/v2/Git-Internals-Packfiles
94pub fn getObjectSize(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !u64 {94pub 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();
9797
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-Objects108// https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
109// https://git-scm.com/book/en/v2/Git-Internals-Packfiles109// https://git-scm.com/book/en/v2/Git-Internals-Packfiles
110pub fn isType(alloc: std.mem.Allocator, dir: std.fs.Dir, maybeobj: Id, typ: Tree.Object.Id.Tag) !?bool {110pub 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();
113113
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-Objects125// https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
126// https://git-scm.com/book/en/v2/Git-Internals-Packfiles126// https://git-scm.com/book/en/v2/Git-Internals-Packfiles
127pub fn getType(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !Tree.Object.Id.Tag {127pub 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();
130130
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-Objects144// https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
145// https://git-scm.com/book/en/v2/Git-Internals-Packfiles145// https://git-scm.com/book/en/v2/Git-Internals-Packfiles
146pub fn revList(alloc: std.mem.Allocator, dir: std.fs.Dir, comptime count: u31, from: CommitId, sub_path: string) !string {146pub 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();
149149
150 const result = try std.ChildProcess.exec(.{150 const result = try std.ChildProcess.exec(.{