diff options
Diffstat (limited to 'src/bin/ngit/sub_commands/push.rs')
| -rw-r--r-- | src/bin/ngit/sub_commands/push.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/bin/ngit/sub_commands/push.rs b/src/bin/ngit/sub_commands/push.rs index 3ec6ff9..7cdc655 100644 --- a/src/bin/ngit/sub_commands/push.rs +++ b/src/bin/ngit/sub_commands/push.rs | |||
| @@ -66,10 +66,9 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 66 | .iter() | 66 | .iter() |
| 67 | .find(|e| { | 67 | .find(|e| { |
| 68 | event_to_cover_letter(e).is_ok_and(|cl| { | 68 | event_to_cover_letter(e).is_ok_and(|cl| { |
| 69 | cl.branch_name.eq(&branch_name) | 69 | (public_key_if_known.is_some_and(|public_key| e.author().eq(&public_key)) |
| 70 | || (public_key_if_known | 70 | && (branch_name.eq(&format!("pr/{}", cl.branch_name)) |
| 71 | .is_some_and(|public_key| e.author().eq(&public_key)) | 71 | || cl.branch_name.eq(&branch_name))) |
| 72 | && branch_name.eq(&format!("pr/{}", cl.branch_name))) | ||
| 73 | || cl.get_branch_name().is_ok_and(|s| s.eq(&branch_name)) | 72 | || cl.get_branch_name().is_ok_and(|s| s.eq(&branch_name)) |
| 74 | }) && !event_is_revision_root(e) | 73 | }) && !event_is_revision_root(e) |
| 75 | }) | 74 | }) |