feat: accept patches from stdin in patch send command

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb
2025-09-24 11:36:57 +00:00
parent df54a53b7c
commit ee17c21dbb
8 changed files with 139 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ Send one or more patches to a repository
Usage: n34 patch send [OPTIONS] <PATCH-PATH>...
Arguments:
<PATCH-PATH>... List of patch files to send (space separated)
<PATCH-PATH>... Space-separated list of patch files to send. Use `-` to read from stdin.
Options:
--repo <NADDR-NIP05-OR-SET> Repository addresses
@@ -20,3 +20,10 @@ Send your generated patches to the repositories specified using the `--repo`
option or retrieved from the `nostr-address` file. When submitting a revision
of an existing patch, include the original patch ID to ensure its correctly
referenced in your revision patch event.
You can also pass patches from stdin, retrieved from a website or directly from
`git-format-patch`. Simply use `-` as the patch path. For example:
```bash
git format-patch --stdout --base master master..HEAD | n34 patch send -
```