| ... | @@ -44,6 +44,7 @@ pub fn getHEAD(alloc: std.mem.Allocator, dir: std.fs.Dir) !CommitId { | ... | @@ -44,6 +44,7 @@ pub fn getHEAD(alloc: std.mem.Allocator, dir: std.fs.Dir) !CommitId { |
| 44 | } | 44 | } |
| 45 | | 45 | |
| 46 | // TODO make this inspect .git/objects | 46 | // TODO make this inspect .git/objects |
| | 47 | // TODO make this return a Reader when we implement it ourselves |
| 47 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects | 48 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects |
| 48 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles | 49 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles |
| 49 | pub fn getObject(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !string { | 50 | pub fn getObject(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !string { |
| ... | @@ -57,6 +58,7 @@ pub fn getObject(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !string { | ... | @@ -57,6 +58,7 @@ pub fn getObject(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !string { |
| 57 | } | 58 | } |
| 58 | | 59 | |
| 59 | // TODO make this inspect .git/objects manually | 60 | // TODO make this inspect .git/objects manually |
| | 61 | // TODO make this return a Reader when we implement it ourselves |
| 60 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects | 62 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects |
| 61 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles | 63 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles |
| 62 | pub fn getObjectSize(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !u64 { | 64 | pub fn getObjectSize(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !u64 { |
| ... | @@ -69,6 +71,7 @@ pub fn getObjectSize(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !u64 { | ... | @@ -69,6 +71,7 @@ pub fn getObjectSize(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !u64 { |
| 69 | } | 71 | } |
| 70 | | 72 | |
| 71 | // TODO make this inspect .git/objects manually | 73 | // TODO make this inspect .git/objects manually |
| | 74 | // TODO make this return a Reader when we implement it ourselves |
| 72 | // TODO make a version of this that accepts an array of sub_paths and searches all of them at once, so as to not lose spot in history when searching for many old paths | 75 | // TODO make a version of this that accepts an array of sub_paths and searches all of them at once, so as to not lose spot in history when searching for many old paths |
| 73 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects | 76 | // https://git-scm.com/book/en/v2/Git-Internals-Git-Objects |
| 74 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles | 77 | // https://git-scm.com/book/en/v2/Git-Internals-Packfiles |