upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nostr_git_remote_helper/Cargo.toml16
-rw-r--r--nostr_git_remote_helper/src/main.rs39
-rw-r--r--nostr_git_remote_helper/src/sub_commands/capabilities.rs8
-rw-r--r--nostr_git_remote_helper/src/sub_commands/mod.rs2
-rw-r--r--nostr_git_remote_helper/src/sub_commands/placeholder.rs10
5 files changed, 0 insertions, 75 deletions
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 @@
1[package]
2name = "nostr-git-remote-helper"
3version = "0.0.1"
4edition = "2021"
5description = "git remote helper for nostr protocol"
6authors = ["DanConwayDev <DanConwayDev@protonmail.com>"]
7readme = "README.md"
8license = "MIT"
9keywords = ["nostr", "git"]
10categories = ["command-line-utilities","git", "git-remote-helper"]
11
12[dependencies]
13anyhow = "1.0.75"
14clap = { version = "4.3.19", features = ["derive"] }
15futures = "0.3.28"
16tokio = "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 @@
1#![cfg_attr(not(test), warn(clippy::pedantic))]
2#![cfg_attr(not(test), warn(clippy::expect_used))]
3
4use anyhow::Result;
5use clap::{Parser, Subcommand};
6
7mod sub_commands;
8
9#[derive(Parser)]
10#[command(author, version, about, long_about = None)]
11#[command(propagate_version = true)]
12pub struct Cli {
13 #[command(subcommand)]
14 command: Commands,
15}
16
17#[derive(Subcommand)]
18enum Commands {
19 /// replace with an actual subcommand
20 Placeholder(sub_commands::placeholder::SubCommandArgs),
21 Capabilities(),
22 // list
23 // - get git list from remote git server
24 // - suppliment list with open prs and send back
25 // - get prs
26 // - get commits against pr
27 // - find most recent commit against pr
28}
29
30#[tokio::main]
31async fn main() -> Result<()> {
32 let cli = Cli::parse();
33 match &cli.command {
34 Commands::Capabilities() => sub_commands::capabilities::launch(),
35 Commands::Placeholder(args) => {
36 sub_commands::placeholder::launch(&cli, args).await
37 }
38 }
39}
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 @@
1use anyhow::Result;
2
3// https://git-scm.com/docs/gitremote-helpers#_capabilities
4pub async fn launch() -> Result<()> {
5 // blank line indicates end of capabilities
6 println("");
7 Ok(())
8}
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 @@
1pub mod capabilities;
2pub 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 @@
1use anyhow::Result;
2
3use crate::Cli;
4
5#[derive(Debug, clap::Args)]
6pub struct SubCommandArgs {}
7
8pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
9 Ok(())
10}