From 9ba3dc08e60906cef6c82a375d3c427d2b2f4733 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 2 Jul 2024 07:46:28 +0100 Subject: refactor: remove old remote helper placeholder to make room for new one --- nostr_git_remote_helper/Cargo.toml | 16 --------- nostr_git_remote_helper/src/main.rs | 39 ---------------------- .../src/sub_commands/capabilities.rs | 8 ----- nostr_git_remote_helper/src/sub_commands/mod.rs | 2 -- .../src/sub_commands/placeholder.rs | 10 ------ 5 files changed, 75 deletions(-) delete mode 100644 nostr_git_remote_helper/Cargo.toml delete mode 100644 nostr_git_remote_helper/src/main.rs delete mode 100644 nostr_git_remote_helper/src/sub_commands/capabilities.rs delete mode 100644 nostr_git_remote_helper/src/sub_commands/mod.rs delete mode 100644 nostr_git_remote_helper/src/sub_commands/placeholder.rs diff --git a/nostr_git_remote_helper/Cargo.toml b/nostr_git_remote_helper/Cargo.toml deleted file mode 100644 index b45c303..0000000 --- a/nostr_git_remote_helper/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "nostr-git-remote-helper" -version = "0.0.1" -edition = "2021" -description = "git remote helper for nostr protocol" -authors = ["DanConwayDev "] -readme = "README.md" -license = "MIT" -keywords = ["nostr", "git"] -categories = ["command-line-utilities","git", "git-remote-helper"] - -[dependencies] -anyhow = "1.0.75" -clap = { version = "4.3.19", features = ["derive"] } -futures = "0.3.28" -tokio = "1.33.0" diff --git a/nostr_git_remote_helper/src/main.rs b/nostr_git_remote_helper/src/main.rs deleted file mode 100644 index 849396c..0000000 --- a/nostr_git_remote_helper/src/main.rs +++ /dev/null @@ -1,39 +0,0 @@ -#![cfg_attr(not(test), warn(clippy::pedantic))] -#![cfg_attr(not(test), warn(clippy::expect_used))] - -use anyhow::Result; -use clap::{Parser, Subcommand}; - -mod sub_commands; - -#[derive(Parser)] -#[command(author, version, about, long_about = None)] -#[command(propagate_version = true)] -pub struct Cli { - #[command(subcommand)] - command: Commands, -} - -#[derive(Subcommand)] -enum Commands { - /// replace with an actual subcommand - Placeholder(sub_commands::placeholder::SubCommandArgs), - Capabilities(), - // list - // - get git list from remote git server - // - suppliment list with open prs and send back - // - get prs - // - get commits against pr - // - find most recent commit against pr -} - -#[tokio::main] -async fn main() -> Result<()> { - let cli = Cli::parse(); - match &cli.command { - Commands::Capabilities() => sub_commands::capabilities::launch(), - Commands::Placeholder(args) => { - sub_commands::placeholder::launch(&cli, args).await - } - } -} diff --git a/nostr_git_remote_helper/src/sub_commands/capabilities.rs b/nostr_git_remote_helper/src/sub_commands/capabilities.rs deleted file mode 100644 index 325cb3b..0000000 --- a/nostr_git_remote_helper/src/sub_commands/capabilities.rs +++ /dev/null @@ -1,8 +0,0 @@ -use anyhow::Result; - -// https://git-scm.com/docs/gitremote-helpers#_capabilities -pub async fn launch() -> Result<()> { - // blank line indicates end of capabilities - println(""); - Ok(()) -} diff --git a/nostr_git_remote_helper/src/sub_commands/mod.rs b/nostr_git_remote_helper/src/sub_commands/mod.rs deleted file mode 100644 index c60ab7a..0000000 --- a/nostr_git_remote_helper/src/sub_commands/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod capabilities; -pub mod placeholder; diff --git a/nostr_git_remote_helper/src/sub_commands/placeholder.rs b/nostr_git_remote_helper/src/sub_commands/placeholder.rs deleted file mode 100644 index ebe05ff..0000000 --- a/nostr_git_remote_helper/src/sub_commands/placeholder.rs +++ /dev/null @@ -1,10 +0,0 @@ -use anyhow::Result; - -use crate::Cli; - -#[derive(Debug, clap::Args)] -pub struct SubCommandArgs {} - -pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { - Ok(()) -} -- cgit v1.2.3