feat: start git client module

This commit is contained in:
CJ van den Berg 2025-04-19 23:41:30 +02:00
parent 05da3205b7
commit 5ad074c681
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 37 additions and 0 deletions

View file

@ -2,6 +2,7 @@ const std = @import("std");
const tp = @import("thespian");
const cbor = @import("cbor");
const tracy = @import("tracy");
const git = @import("git");
const ripgrep = @import("ripgrep");
const root = @import("root");
const location_history = @import("location_history");
@ -827,6 +828,11 @@ const cmds = struct {
}
pub const find_in_files_query_meta: Meta = .{ .arguments = &.{.string} };
pub fn git_branch(self: *Self, _: Ctx) Result {
try git.get_current_branch(self.allocator);
}
pub const git_branch_meta: Meta = .{ .description = "Get the current git branch" };
pub fn shell_execute_log(self: *Self, ctx: Ctx) Result {
if (!try ctx.args.match(.{ tp.string, tp.more }))
return error.InvalidShellArgument;