feat: write patches to the stdout in patch fetch command

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb
2025-09-24 15:45:11 +00:00
parent ee17c21dbb
commit d2adff7882
3 changed files with 39 additions and 11 deletions

View File

@@ -13,9 +13,19 @@ Arguments:
Options:
--repo <NADDR-NIP05-OR-SET> Repository addresses
-o, --output <PATH> Output directory for the patches. Default to the current directory
-o, --output <PATH> Directory for saving patches. Defaults to the current directory. Use `-` for stdout output
```
Fetches patches using their original patch ID. All fetched patches will be saved
to the specified output directory (current directory by default). You can then
apply or merge these patches into your branch as needed.
You can also write patches to stdout for direct application with tools like
`git-am`. For instance, to fetch and apply patches use:
```bash
n34 patch fetch -o '-' <note1...> | git am --empty=drop
```
The `--empty=drop` option ensures empty commits, such as cover letters, are
omitted.