diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/ngit/sub_commands/pull.rs | 7 | ||||
| -rw-r--r-- | src/bin/ngit/sub_commands/push.rs | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/bin/ngit/sub_commands/pull.rs b/src/bin/ngit/sub_commands/pull.rs index b331dbe..eba6fc5 100644 --- a/src/bin/ngit/sub_commands/pull.rs +++ b/src/bin/ngit/sub_commands/pull.rs | |||
| @@ -50,10 +50,9 @@ pub async fn launch() -> Result<()> { | |||
| 50 | .iter() | 50 | .iter() |
| 51 | .find(|e| { | 51 | .find(|e| { |
| 52 | event_to_cover_letter(e).is_ok_and(|cl| { | 52 | event_to_cover_letter(e).is_ok_and(|cl| { |
| 53 | cl.branch_name.eq(&branch_name) | 53 | (public_key_if_known.is_some_and(|public_key| e.author().eq(&public_key)) |
| 54 | || (public_key_if_known | 54 | && (branch_name.eq(&format!("pr/{}", cl.branch_name)) |
| 55 | .is_some_and(|public_key| e.author().eq(&public_key)) | 55 | || cl.branch_name.eq(&branch_name))) |
| 56 | && branch_name.eq(&format!("pr/{}", cl.branch_name))) | ||
| 57 | || cl.get_branch_name().is_ok_and(|s| s.eq(&branch_name)) | 56 | || cl.get_branch_name().is_ok_and(|s| s.eq(&branch_name)) |
| 58 | }) && !event_is_revision_root(e) | 57 | }) && !event_is_revision_root(e) |
| 59 | }) | 58 | }) |
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 | }) |