upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-08-08 17:53:42 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2024-08-08 17:53:42 +0100
commita556464452789dc72cb9b0bff8e9ba6addc6639a (patch)
tree88954d7e9b476626e447b0def0a07bc04abfe898 /src
parent091f695c90158f161c54212e1951ba0d48a80b56 (diff)
fix(send): patch count
fix [PATCH n/n] when no cover letter and patches great than 1 fixes error where the first patch would be [PATCH] followed by [PATCH n/n]
Diffstat (limited to 'src')
-rw-r--r--src/sub_commands/send.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sub_commands/send.rs b/src/sub_commands/send.rs
index f10d2d3..f492734 100644
--- a/src/sub_commands/send.rs
+++ b/src/sub_commands/send.rs
@@ -675,7 +675,7 @@ pub async fn generate_cover_letter_and_patch_events(
675 signer, 675 signer,
676 repo_ref, 676 repo_ref,
677 events.last().map(nostr::Event::id), 677 events.last().map(nostr::Event::id),
678 if events.is_empty() { 678 if events.is_empty() && commits.len().eq(&1) {
679 None 679 None
680 } else { 680 } else {
681 Some(((i + 1).try_into()?, commits.len().try_into()?)) 681 Some(((i + 1).try_into()?, commits.len().try_into()?))