RebaseSubmitStrategy#dryRun: Remove redundant check for missing dependencies

RebaseSubmitStrategy#dryRun calls MergeUtil#canMerge which checks for
missing dependencies as the first step. Hence
RebaseSubmitStrategy#dryRun doesn't need to do the same check before
calling MergeUtil#canMerge.

RebaseSubmitStrategy#dryRun is used to compute the mergeability flag for
the change index when the project uses Rebase Always or Rebase If
Necessary as submit strategy. Hence making this computation a little
faster helps with reducing the time that is spent on indexing changes.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I233f80079b29845c6e195182befd1c7749166599
This commit is contained in:
Edwin Kempin
2019-09-27 15:05:54 +02:00
parent bfa2a6e897
commit 320830cc49

View File

@@ -309,7 +309,6 @@ public class RebaseSubmitStrategy extends SubmitStrategy {
throws IntegrationException {
// Test for merge instead of cherry pick to avoid false negatives
// on commit chains.
return !args.mergeUtil.hasMissingDependencies(args.mergeSorter, toMerge)
&& args.mergeUtil.canMerge(args.mergeSorter, repo, mergeTip, toMerge);
return args.mergeUtil.canMerge(args.mergeSorter, repo, mergeTip, toMerge);
}
}