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