srctree

Gregory Mullen parent 2f026b10 7d2c55d1
move non pub fn lower

inlinesplit
src/git/Commit.zig added: 10, removed: 10, total 0
@@ -17,15 +17,6 @@ ptr_parent: ?*Commit = null, // TOOO multiple parents
 
pub const Commit = @This();
 
/// TODO this
fn gpgSig(itr: *std.mem.SplitIterator(u8, .sequence)) !void {
while (itr.next()) |line| {
if (std.mem.indexOf(u8, line, "-----END PGP SIGNATURE-----") != null) return;
if (std.mem.indexOf(u8, line, "-----END SSH SIGNATURE-----") != null) return;
}
return error.InvalidGpgsig;
}
 
pub fn init(sha: SHA, data: []const u8) !Commit {
if (std.mem.startsWith(u8, data, "commit")) unreachable;
var lines = std.mem.splitSequence(u8, data, "\n");
@@ -165,6 +156,15 @@ pub fn format(
, .{ self.author, self.committer, self.message });
}
 
/// TODO this
fn gpgSig(itr: *std.mem.SplitIterator(u8, .sequence)) !void {
while (itr.next()) |line| {
if (std.mem.indexOf(u8, line, "-----END PGP SIGNATURE-----") != null) return;
if (std.mem.indexOf(u8, line, "-----END SSH SIGNATURE-----") != null) return;
}
return error.InvalidGpgsig;
}
 
const SHA = @import("SHA.zig");
const Repo = @import("Repo.zig");
const Tree = @import("tree.zig");