authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-04-09 13:45:52 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-04-09 13:45:52 -07:00
log768bbb26340830e58fce6570ca7ba07b0218ffbf
tree3662ce535c5b0dc69902243771100e0074df4f71
parent121b2c40126e597cc2e8b2ff9b2813fec7f0327f
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

test: getObject renamed in b5407960b0d512153e39e00af3a5a063977be944


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

test.zig+4-4
...@@ -28,7 +28,7 @@ test {...@@ -28,7 +28,7 @@ test {
28 const alloc = arena.allocator();28 const alloc = arena.allocator();
29 const git_dir = try nfs.cwd().openDir(".git", .{});29 const git_dir = try nfs.cwd().openDir(".git", .{});
30 defer git_dir.close();30 defer git_dir.close();
31 try expect(try git.getObject(alloc, git_dir, "a542da41f1f0c59fdd0e1527cf5ff9de3f6a0c8e")).toEqualString(31 try expect(try git.getObjectContent(alloc, git_dir, "a542da41f1f0c59fdd0e1527cf5ff9de3f6a0c8e")).toEqualString(
32 \\tree 5403fecad0fde9120535321f222a061abc2849d932 \\tree 5403fecad0fde9120535321f222a061abc2849d9
33 \\parent c39f57f6bb01664a7146ddbfc3debe76ec135f4433 \\parent c39f57f6bb01664a7146ddbfc3debe76ec135f44
34 \\author Meghan Denny <hello@nektro.net> 1692246864 -070034 \\author Meghan Denny <hello@nektro.net> 1692246864 -0700
...@@ -76,7 +76,7 @@ test {...@@ -76,7 +76,7 @@ test {
76 const alloc = arena.allocator();76 const alloc = arena.allocator();
77 const git_dir = try nfs.cwd().openDir(".git", .{});77 const git_dir = try nfs.cwd().openDir(".git", .{});
78 defer git_dir.close();78 defer git_dir.close();
79 const c = try git.parseCommit(alloc, try git.getObject(alloc, git_dir, "a542da41f1f0c59fdd0e1527cf5ff9de3f6a0c8e"));79 const c = try git.parseCommit(alloc, try git.getObjectContent(alloc, git_dir, "a542da41f1f0c59fdd0e1527cf5ff9de3f6a0c8e"));
80 try expect(c.tree.id).toEqualString("5403fecad0fde9120535321f222a061abc2849d9");80 try expect(c.tree.id).toEqualString("5403fecad0fde9120535321f222a061abc2849d9");
81 try expect(c.parents.len).toEqual(1);81 try expect(c.parents.len).toEqual(1);
82 try expect(c.parents[0].id).toEqualString("c39f57f6bb01664a7146ddbfc3debe76ec135f44");82 try expect(c.parents[0].id).toEqualString("c39f57f6bb01664a7146ddbfc3debe76ec135f44");
...@@ -98,7 +98,7 @@ test {...@@ -98,7 +98,7 @@ test {
98 const alloc = arena.allocator();98 const alloc = arena.allocator();
99 const git_dir = try nfs.cwd().openDir(".git", .{});99 const git_dir = try nfs.cwd().openDir(".git", .{});
100 defer git_dir.close();100 defer git_dir.close();
101 try expect(try git.getObject(alloc, git_dir, "5403fecad0fde9120535321f222a061abc2849d9")).toEqualString(101 try expect(try git.getObjectContent(alloc, git_dir, "5403fecad0fde9120535321f222a061abc2849d9")).toEqualString(
102 // zig fmt: off102 // zig fmt: off
103 "100644 blob 8e8d2ceba4b327ce9db93f988492d0e21a461012\t.gitattributes\n" ++103 "100644 blob 8e8d2ceba4b327ce9db93f988492d0e21a461012\t.gitattributes\n" ++
104 "100644 blob bb2a57bd81d13975f2a74ae5dd0e652de07bb8a7\t.gitignore\n" ++104 "100644 blob bb2a57bd81d13975f2a74ae5dd0e652de07bb8a7\t.gitignore\n" ++
...@@ -116,7 +116,7 @@ test {...@@ -116,7 +116,7 @@ test {
116 const alloc = arena.allocator();116 const alloc = arena.allocator();
117 const git_dir = try nfs.cwd().openDir(".git", .{});117 const git_dir = try nfs.cwd().openDir(".git", .{});
118 defer git_dir.close();118 defer git_dir.close();
119 const t = try git.parseTree(alloc, try git.getObject(alloc, git_dir, "5403fecad0fde9120535321f222a061abc2849d9"));119 const t = try git.parseTree(alloc, try git.getObjectContent(alloc, git_dir, "5403fecad0fde9120535321f222a061abc2849d9"));
120 // TODO: test fields when we upgrade to 0.14 and have decl literals120 // TODO: test fields when we upgrade to 0.14 and have decl literals
121 // try expect(try extras.mapBy(alloc, t.children, .id)).toEqualSlice(&.{121 // try expect(try extras.mapBy(alloc, t.children, .id)).toEqualSlice(&.{
122 // .{ .blob = .{ .id = "8e8d2ceba4b327ce9db93f988492d0e21a461012" } },122 // .{ .blob = .{ .id = "8e8d2ceba4b327ce9db93f988492d0e21a461012" } },