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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user