╭ changed ──────╮ │src/command.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────╮ │1 const std = @import("std"); │ │2 const srv = @import("./serve.zig"); │ │3 -const ssh = @import("./ssh_helper.zig");│ │3 +const ssh = @import("./ssh_git.zig"); │ │4 │ │5 pub const CommandKind = enum { │ │6 serve, │ ╰───────────────────────────────────────────╯ ╭─────────────────────────╮ │ 7 - ssh_helper, │ │ 7 + ssh_git, │ │ 8 }; │ │ 9 │ │10 const Help = struct {│ ╰─────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │24 \\haxy serve --http-listen 127.0.0.1:8080 --ssh-listen 127.0.0.1:8081 --wui-listen 127.0.0.1:8082 --data-dir /srv/git│ │25 , │ │26 }, │ │27 - .ssh_helper => .{ │ │28 - .name = "ssh-helper", │ │27 + .ssh_git => .{ │ │28 + .name = "ssh-git", │ │29 .descrip = │ │30 \\a helper run by sshd that forwards Git SSH service requests to serve. │ │31 , │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │32 .example = │ │33 - \\haxy ssh-helper --ssh-connect 127.0.0.1:8081 --service upload-pack <directory>│ │33 + \\haxy ssh-git --ssh-connect 127.0.0.1:8081 --service upload-pack <directory> │ │34 , │ │35 }, │ │36 }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │190 /// if any additional allocation needs to be done, the arena inside the cmd args will be used.│ │191 pub const Command = union(CommandKind) { │ │192 serve: srv.Options, │ │193 - ssh_helper: ssh.Options, │ │193 + ssh_git: ssh.Options, │ │194 │ │195 pub fn initMaybe(cmd_args: *CommandArgs) !?Command { │ │196 const command_kind = cmd_args.command_kind orelse return null; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────╮ │215 │ │216 return .{ .serve = options }; │ │217 }, │ │218 - .ssh_helper => { │ │218 + .ssh_git => { │ │219 if (cmd_args.positional_args.len > 1) return null;│ │220 │ │221 var options: ssh.Options = .{}; │ ╰───────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │228 } │ │229 options.dir = if (cmd_args.positional_args.len == 1) cmd_args.positional_args[0] else null;│ │230 │ │231 - return .{ .ssh_helper = options }; │ │231 + return .{ .ssh_git = options }; │ │232 }, │ │233 } │ │234 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯