diff --git a/git.zig b/git.zig index 50b83ef4974902f5e19544a7e2c37dbf16cabf3c..a90db90640b71610bb19b8cf85526e7e1f907660 100644 --- a/git.zig +++ b/git.zig @@ -10,6 +10,7 @@ pub const BlobId = struct { id: Id }; /// Returns the result of running `git rev-parse HEAD` /// dir must already be pointing at the .git folder +// TODO this doesnt handle when there are 0 commits pub fn getHEAD(alloc: std.mem.Allocator, dir: std.fs.Dir) !Id { const h = std.mem.trimRight(u8, try dir.readFileAlloc(alloc, "HEAD", 1024), "\n");