upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/bin/ngit
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-02-17 12:11:33 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-02-17 14:04:32 +0000
commit5cc8ae28cb462d2cb0b7f74dfa5238e62d17eb70 (patch)
tree7e1f81c8204c3f50b30fa69b410f60ffa872bec7 /src/bin/ngit
parent06ebbf7c73b64225ae083bb3134f7c7c630c5565 (diff)
feat: support multiline descriptions in push-options via \n escape
Git push-options are line-based so literal newlines cannot be sent. Users can now write the two-character sequence \n which is decoded into real newlines before publishing. Use \\n for a literal backslash-n. Includes unit tests, integration test, help text, and changelog entry.
Diffstat (limited to 'src/bin/ngit')
-rw-r--r--src/bin/ngit/cli.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs
index 85c74cd..ade7861 100644
--- a/src/bin/ngit/cli.rs
+++ b/src/bin/ngit/cli.rs
@@ -8,7 +8,7 @@ use crate::sub_commands;
8#[command( 8#[command(
9 author, 9 author,
10 version, 10 version,
11 help_template = "{name} {version}\nnostr plugin for git\n - clone a nostr repository, or add as a remote, by using the url format nostr://pub123/identifier\n - remote branches beginning with `pr/` are open PRs from contributors; `ngit list` can be used to view all PRs\n - to open a PR, push a branch with the prefix `pr/` or use `ngit send` for advanced options\n- publish a repository to nostr with `ngit init`\n\n{usage}\n{all-args}" 11 help_template = "{name} {version}\nnostr plugin for git\n - clone a nostr repository, or add as a remote, by using the url format nostr://npub123/identifier\n - remote branches beginning with `pr/` are open PRs from contributors; `ngit list` can be used to view all PRs\n - to open a PR, push a branch with the prefix `pr/` or use `ngit send` for advanced options\n set title and description via push options:\n git push -o 'title=My PR' -o 'description=line1\\n\\nline2' -u origin pr/branch\n- publish a repository to nostr with `ngit init`\n\n{usage}\n{all-args}"
12)] 12)]
13#[command(propagate_version = true)] 13#[command(propagate_version = true)]
14#[allow(clippy::struct_excessive_bools)] 14#[allow(clippy::struct_excessive_bools)]