authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-05-02 15:29:10 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-05-02 15:29:10 -07:00
log7063aab5c007b0e8b76f8b97ac1430b5da9c0684
treee85322865ef2afbc273dffe1a0f076aa62ce82cb
parentc7920b30138b457fccc0a3d155b0e2742de52325

add a TODO


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

git.zig+1
...@@ -10,6 +10,7 @@ pub const BlobId = struct { id: Id };...@@ -10,6 +10,7 @@ pub const BlobId = struct { id: Id };
1010
11/// Returns the result of running `git rev-parse HEAD`11/// Returns the result of running `git rev-parse HEAD`
12/// dir must already be pointing at the .git folder12/// dir must already be pointing at the .git folder
13// TODO this doesnt handle when there are 0 commits
13pub fn getHEAD(alloc: std.mem.Allocator, dir: std.fs.Dir) !Id {14pub fn getHEAD(alloc: std.mem.Allocator, dir: std.fs.Dir) !Id {
14 const h = std.mem.trimRight(u8, try dir.readFileAlloc(alloc, "HEAD", 1024), "\n");15 const h = std.mem.trimRight(u8, try dir.readFileAlloc(alloc, "HEAD", 1024), "\n");
1516