| ... | @@ -196,6 +196,20 @@ test { | ... | @@ -196,6 +196,20 @@ test { |
| 196 | _ = t; // TODO: test fields when we upgrade to 0.14 and have decl literals | 196 | _ = t; // TODO: test fields when we upgrade to 0.14 and have decl literals |
| 197 | } | 197 | } |
| 198 | | 198 | |
| | 199 | test { |
| | 200 | const gpa = std.testing.allocator; |
| | 201 | var arena = std.heap.ArenaAllocator.init(std.testing.allocator); |
| | 202 | defer arena.deinit(); |
| | 203 | const alloc = arena.allocator(); |
| | 204 | const git_dir = try nfs.cwd().openDir(".git", .{}); |
| | 205 | defer git_dir.close(); |
| | 206 | var repo: git.Repository = .init(git_dir, gpa); |
| | 207 | defer repo.deinit(); |
| | 208 | const head_oid = (try git.getHEAD(alloc, git_dir)).?; |
| | 209 | _ = try repo.getTreeCommits(alloc, head_oid, ""); |
| | 210 | _ = try repo.getTreeCommits(alloc, head_oid, "testdata"); |
| | 211 | } |
| | 212 | |
| 199 | test { | 213 | test { |
| 200 | var arena = std.heap.ArenaAllocator.init(std.testing.allocator); | 214 | var arena = std.heap.ArenaAllocator.init(std.testing.allocator); |
| 201 | defer arena.deinit(); | 215 | defer arena.deinit(); |