diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-07-23 17:16:18 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-07-23 17:16:18 +0100 |
| commit | 802b115ca648011fd311a22ef3650aaa5a1a0acf (patch) | |
| tree | 6305089d1e1e3dfc1109caccfc56bd71166942db /src/bin/git_remote_nostr/push.rs | |
| parent | 42498f5d4a67f7f17c01534b3dcd3ed99d724d5c (diff) | |
fix(remote): improve pr error messages
as a temporary measure
Diffstat (limited to 'src/bin/git_remote_nostr/push.rs')
| -rw-r--r-- | src/bin/git_remote_nostr/push.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bin/git_remote_nostr/push.rs b/src/bin/git_remote_nostr/push.rs index e694e18..353ad77 100644 --- a/src/bin/git_remote_nostr/push.rs +++ b/src/bin/git_remote_nostr/push.rs | |||
| @@ -529,6 +529,10 @@ async fn generate_patches_or_pr_event_or_pr_updates( | |||
| 529 | } | 529 | } |
| 530 | } | 530 | } |
| 531 | if unsigned_pr_event.is_none() { | 531 | if unsigned_pr_event.is_none() { |
| 532 | bail!( | ||
| 533 | "a commit in your proposal is too big for a nostr patch. The repository doesnt list a grasp server which would otherwise be used to submit your proposal as nostr Pull Request. Soon ngit will support pushing your changes to a different git / grasp git server." | ||
| 534 | ); | ||
| 535 | |||
| 532 | // TODO get grasp_default_set servers that aren't in repo_grasps | 536 | // TODO get grasp_default_set servers that aren't in repo_grasps |
| 533 | // cycle through until one succeeds TODO create | 537 | // cycle through until one succeeds TODO create |
| 534 | // personal-fork announcement with grasp servers and | 538 | // personal-fork announcement with grasp servers and |
| @@ -561,7 +565,11 @@ async fn generate_patches_or_pr_event_or_pr_updates( | |||
| 561 | ); | 565 | ); |
| 562 | } | 566 | } |
| 563 | } else { | 567 | } else { |
| 564 | bail!("could not find a grasp server that accepts the Pull Request refs"); | 568 | bail!( |
| 569 | "a commit in your proposal is too big for a nostr patch. tried to use submit as a nostr Pull Request but could not find a grasp server that would accept your changes" | ||
| 570 | ); | ||
| 571 | // TODO suggest `ngit send` where user could specify their own clone | ||
| 572 | // url to push to once that feature is added | ||
| 565 | } | 573 | } |
| 566 | } else { | 574 | } else { |
| 567 | for patch in generate_cover_letter_and_patch_events( | 575 | for patch in generate_cover_letter_and_patch_events( |