boolean (final @NotNull List<? extends GitRepository> repositories, final @NotNull @NlsSafe String reference, final @Nullable String newBranch, @NotNull ProgressIndicator indicator, @NotNull StructuredIdeActivity activity) { AtomicBoolean result = new AtomicBoolean(); GitSaveChangesPolicy saveMethod = GitVcsSettings.getInstance(myProject).getSaveChangesPolicy(); GitPreservingProcess preservingProcess = new GitPreservingProcess(myProject, myGit, getRootsFromRepositories(repositories), GitBundle.message("checkout.operation.name"), reference, saveMethod, indicator, () -> result.set(checkoutOrNotify(repositories, reference, newBranch, false, activity))); preservingProcess.execute(); return result.get(); }