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 {
7474// https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
7575// https://git-scm.com/book/en/v2/Git-Internals-Packfiles
7676pub 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});
7878 defer t.end();
7979
8080 const result = try std.ChildProcess.exec(.{
......@@ -92,7 +92,7 @@ pub fn getObject(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !string {
9292// https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
9393// https://git-scm.com/book/en/v2/Git-Internals-Packfiles
9494pub 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});
9696 defer t.end();
9797
9898 const result = try std.ChildProcess.exec(.{
......@@ -108,7 +108,7 @@ pub fn getObjectSize(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !u64 {
108108// https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
109109// https://git-scm.com/book/en/v2/Git-Internals-Packfiles
110110pub 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) });
112112 defer t.end();
113113
114114 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
125125// https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
126126// https://git-scm.com/book/en/v2/Git-Internals-Packfiles
127127pub 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});
129129 defer t.end();
130130
131131 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.
144144// https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
145145// https://git-scm.com/book/en/v2/Git-Internals-Packfiles
146146pub 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 });
148148 defer t.end();
149149
150150 const result = try std.ChildProcess.exec(.{