diff options
author | Justin Worthe <justin@jemstep.com> | 2020-03-30 11:07:24 +0200 |
---|---|---|
committer | Justin Worthe <justin@jemstep.com> | 2020-03-30 11:07:24 +0200 |
commit | 0ce73c3987b8adbc210e27415f37f7c3251835f8 (patch) | |
tree | f75792588874d6fee6490990f93299bd31e93b0b | |
parent | 6785bade8f9a9636fc468223e33b9c12002ac593 (diff) |
Rearranged checks so that the expensive reproducing merge commit happens after rebase check
-rw-r--r-- | src/policies.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/policies.rs b/src/policies.rs index fb10aed..cc2b71e 100644 --- a/src/policies.rs +++ b/src/policies.rs @@ -79,14 +79,9 @@ pub fn verify_git_commits<G: Git, P: Gpg>( })?; } - if config.verify_commit_signatures { + if config.verify_rebased { policy_result = policy_result.and_then(|| { - verify_commit_signatures::<G, P>( - git, - &gpg, - ¬_manually_verified_commits, - &mut keyring, - ) + verify_rebased::<G>(&all_commits, git, &ref_update, &config.override_tag_pattern) })?; } @@ -95,9 +90,14 @@ pub fn verify_git_commits<G: Git, P: Gpg>( .and_then(|| verify_different_authors::<G>(&all_commits, git, &ref_update))?; } - if config.verify_rebased { + if config.verify_commit_signatures { policy_result = policy_result.and_then(|| { - verify_rebased::<G>(&all_commits, git, &ref_update, &config.override_tag_pattern) + verify_commit_signatures::<G, P>( + git, + &gpg, + ¬_manually_verified_commits, + &mut keyring, + ) })?; } } |