Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
42,300 | void (@NotNull String name, @NotNull String reference, @NotNull List<? extends GitRepository> repositories) { for (GitRepository repository : repositories) { GitCommandResult result = myGit.createNewTag(repository, name, null, reference); repository.getRepositoryFiles().refreshTagsFiles(); if (!result.success()) { Stri... | createNewTag |
42,301 | void (@NotNull String newBranchName, @NotNull String startPoint, @NotNull List<? extends GitRepository> repositories) { checkoutNewBranchStartingFrom(newBranchName, startPoint, false, repositories); } | checkoutNewBranchStartingFrom |
42,302 | void (@NotNull String newBranchName, @NotNull String startPoint, boolean overwriteIfNeeded, @NotNull List<? extends GitRepository> repositories) { updateInfo(repositories); new GitCheckoutOperation(myProject, myGit, myUiHandler, repositories, startPoint, false, overwriteIfNeeded, true, newBranchName).execute(); } | checkoutNewBranchStartingFrom |
42,303 | void (final @NotNull String reference, boolean detach, @NotNull List<? extends GitRepository> repositories) { updateInfo(repositories); new GitCheckoutOperation(myProject, myGit, myUiHandler, repositories, reference, detach, false, false, null).execute(); } | checkout |
42,304 | void (final @NotNull String branchName, final @NotNull List<? extends GitRepository> repositories) { updateInfo(repositories); new GitDeleteBranchOperation(myProject, myGit, myUiHandler, repositories, branchName).execute(); } | deleteBranch |
42,305 | void (final @NotNull String tagName, final @NotNull List<? extends GitRepository> repositories) { updateInfo(repositories); new GitDeleteTagOperation(myProject, myGit, myUiHandler, repositories, tagName).execute(); } | deleteTag |
42,306 | void (final @NotNull String tagName, final @NotNull Map<GitRepository, String> repositories) { updateInfo(repositories.keySet()); new GitDeleteRemoteTagOperation(myProject, myGit, myUiHandler, repositories, tagName).execute(); } | deleteRemoteTag |
42,307 | void (final @NotNull String branchName, final @NotNull List<? extends GitRepository> repositories) { deleteRemoteBranches(Collections.singletonList(branchName), repositories); } | deleteRemoteBranch |
42,308 | void (@NotNull List<String> branchNames, @NotNull List<? extends GitRepository> repositories) { updateInfo(repositories); new GitDeleteRemoteBranchOperation(myProject, myGit, myUiHandler, repositories, branchNames).execute(); } | deleteRemoteBranches |
42,309 | void (final @NotNull String branchName, final @NotNull GitBrancher.DeleteOnMergeOption deleteOnMerge, final @NotNull List<? extends GitRepository> repositories) { updateInfo(repositories); new GitMergeOperation(myProject, myGit, myUiHandler, repositories, branchName, deleteOnMerge).execute(); } | merge |
42,310 | void (@NotNull List<? extends GitRepository> repositories, @NotNull String branchName) { updateInfo(repositories); GitRebaseUtils.rebase(myProject, repositories, new GitRebaseParams(myVcs.getVersion(), branchName), myUiHandler.getProgressIndicator()); } | rebase |
42,311 | void (@NotNull List<? extends GitRepository> repositories, @NotNull String branchName) { rebase(repositories, "HEAD", branchName); //NON-NLS } | rebaseOnCurrent |
42,312 | void (@NotNull List<? extends GitRepository> repositories, @NotNull String upstream, @NotNull String branchName) { updateInfo(repositories); GitRebaseUtils.rebase(myProject, repositories, new GitRebaseParams(myVcs.getVersion(), branchName, null, upstream, false, false), myUiHandler.getProgressIndicator()); } | rebase |
42,313 | void (@NotNull String currentName, @NotNull String newName, @NotNull List<? extends GitRepository> repositories) { updateInfo(repositories); new GitRenameBranchOperation(myProject, myGit, myUiHandler, currentName, newName, repositories).execute(); } | renameBranch |
42,314 | void (@NotNull Collection<? extends GitRepository> repositories) { for (GitRepository repository : repositories) { repository.update(); } } | updateInfo |
42,315 | void () { while (hasMoreRepositories()) { GitRepository repository = next(); GitCommandResult result = myGit.renameBranch(repository, myCurrentName, myNewName); if (result.success()) { repository.update(); notifyBranchNameChanged(repository, myCurrentName, myNewName); markSuccessful(repository); } else { fatalError(Git... | execute |
42,316 | void () { GitCompoundResult compoundResult = new GitCompoundResult(myProject); Collection<GitRepository> repositories = getSuccessfulRepositories(); for (GitRepository repository : repositories) { GitCommandResult result = myGit.renameBranch(repository, myNewName, myCurrentName); if (result.success()) { repository.upda... | rollback |
42,317 | void (@NotNull GitRepository repository, @NotNull String oldName, @NotNull String newName) { ApplicationManager.getApplication().invokeLater(() -> { if (myProject.isDisposed()) return; myProject.getMessageBus().syncPublisher(BranchRenameListener.VCS_BRANCH_RENAMED) .branchNameChanged(repository.getRoot(), oldName, newN... | notifyBranchNameChanged |
42,318 | String () { return GitBundle.message("git.rename.branch.was.renamed.to", HtmlChunk.text(myCurrentName).code().bold(), HtmlChunk.text(myNewName).code().bold()); } | getSuccessMessage |
42,319 | Collection<String> (@NotNull Collection<? extends GitBranch> branches) { return ContainerUtil.map(branches, GitBranch::getName); } | convertBranchesToNames |
42,320 | void (String line, Key outputType) { if (outputType != ProcessOutputTypes.STDOUT) return; if (line.length() != 0) tags.add(line); } | onLineAvailable |
42,321 | Collection<String> (@NotNull Collection<? extends GitRemoteBranch> remoteBranches) { return ContainerUtil.filter(convertBranchesToNames(remoteBranches), input -> !input.equals("HEAD")); //NON-NLS } | getBranchNamesWithoutRemoteHead |
42,322 | Collection<String> (Collection<? extends GitRepository> repositories, boolean local) { Collection<String> names; if (local) { names = convertBranchesToNames(getCommonLocalBranches(repositories)); } else { names = getBranchNamesWithoutRemoteHead(getCommonRemoteBranches(repositories)); } return StreamEx.of(names).sorted(... | getCommonBranches |
42,323 | List<GitLocalBranch> (@NotNull Collection<? extends GitRepository> repositories) { return collectCommon(repositories.stream().map(repository -> repository.getBranches().getLocalBranches())); } | getCommonLocalBranches |
42,324 | List<GitRemoteBranch> (@NotNull Collection<? extends GitRepository> repositories) { return collectCommon(repositories.stream().map(repository -> repository.getBranches().getRemoteBranches())); } | getCommonRemoteBranches |
42,325 | List<String> (@NotNull Collection<String> branchNames) { return ContainerUtil.sorted(branchNames, NaturalComparator.INSTANCE); } | sortBranchNames |
42,326 | boolean (@Nullable @NonNls String branchA, @Nullable @NonNls String branchB) { return StringUtilRt.equal(branchA, branchB, SystemInfo.isFileSystemCaseSensitive); } | equalBranches |
42,327 | void (@NotNull Project project, @NotNull List<? extends GitRepository> repositories, @NotNull List<String> localBranchNames) { GitBranchActionsUtilKt.updateBranches(project, repositories, localBranchNames); } | updateBranches |
42,328 | DeepComparator (@NotNull VcsLogData dataProvider, @NotNull VcsLogUi ui) { DeepComparator comparator = myComparators.get(ui); if (comparator == null) { comparator = new DeepComparator(myProject, GitRepositoryManager.getInstance(myProject), dataProvider, ui, this); myComparators.put(ui, comparator); if (ui instanceof Dis... | getInstance |
42,329 | void () { DeepComparator removed = myComparators.remove(ui); if (removed != null) Disposer.dispose(removed); // check for null in case we dispose DeepComparatorHolder before ui } | dispose |
42,330 | void () { myComparators.clear(); } | dispose |
42,331 | GitRepository () { return myRemainingRepositories.iterator().next(); } | next |
42,332 | boolean () { return !myRemainingRepositories.isEmpty(); } | hasMoreRepositories |
42,333 | void (GitRepository... repositories) { for (GitRepository repository : repositories) { mySuccessfulRepositories.add(repository); myRemainingRepositories.remove(repository); } } | markSuccessful |
42,334 | void (GitRepository... repositories) { for (GitRepository repository : repositories) { mySkippedRepositories.add(repository); myRemainingRepositories.remove(repository); } } | markSkip |
42,335 | boolean () { return !mySuccessfulRepositories.isEmpty(); } | wereSuccessful |
42,336 | boolean () { return !mySkippedRepositories.isEmpty(); } | wereSkipped |
42,337 | Collection<GitRepository> () { return mySuccessfulRepositories; } | getSuccessfulRepositories |
42,338 | Collection<GitRepository> () { return mySkippedRepositories; } | getSkippedRepositories |
42,339 | Collection<GitRepository> () { return myRepositories; } | getRepositories |
42,340 | List<GitRepository> (final @NotNull GitRepository currentRepository) { List<GitRepository> repositories = new ArrayList<>(myRemainingRepositories); repositories.remove(currentRepository); return repositories; } | getRemainingRepositoriesExceptGiven |
42,341 | void (@NotNull @NlsContexts.NotificationContent String message) { VcsNotifier.getInstance(myProject).notifySuccess(BRANCH_OPERATION_SUCCESS, "", message); } | notifySuccess |
42,342 | void () { notifySuccess(getSuccessMessage()); } | notifySuccess |
42,343 | void () { ApplicationManager.getApplication().invokeAndWait(() -> FileDocumentManager.getInstance().saveAllDocuments()); } | saveAllDocuments |
42,344 | void (@NotNull @NlsContexts.NotificationTitle String title, @NotNull @NlsContexts.NotificationContent String message) { if (wereSuccessful()) { showFatalErrorDialogWithRollback(title, message); } else { notifyError(title, message); } } | fatalError |
42,345 | void (@NotNull @NlsContexts.NotificationTitle String title, @NotNull GitCommandResult result) { fatalError(title, result.getErrorOutputAsHtmlString()); } | fatalError |
42,346 | void (@NotNull @NlsContexts.DialogTitle String title, @NotNull @NlsContexts.DialogMessage String message) { boolean rollback = myUiHandler.notifyErrorWithRollbackProposal(title, message, getRollbackProposal()); if (rollback) { rollback(); } } | showFatalErrorDialogWithRollback |
42,347 | void (@NotNull @NlsContexts.NotificationTitle String title, @NotNull @NlsContexts.NotificationContent String message) { myUiHandler.notifyError(title, message); } | notifyError |
42,348 | ProgressIndicator () { return myUiHandler.getProgressIndicator(); } | getIndicator |
42,349 | void () { if (wereSuccessful()) { showUnmergedFilesDialogWithRollback(); } else { showUnmergedFilesNotification(); } } | fatalUnmergedFilesError |
42,350 | void () { if (getRepositories().size() == 1) { GitRepository repository = myRepositories.iterator().next(); String currentHead = myCurrentHeads.get(repository); if (currentHead != null) { mySettings.setRecentBranchOfRepository(repository.getRoot().getPath(), currentHead); } else { LOG.error("Current head is not known f... | updateRecentBranch |
42,351 | void () { String currentBranch = ContainerUtil.getFirstItem(myCurrentHeads.values()); if (currentBranch != null) { ApplicationManager.getApplication().invokeLater(() -> { if (myProject.isDisposed()) return; myProject.getMessageBus().syncPublisher(BranchChangeListener.VCS_BRANCH_CHANGED).branchWillChange(currentBranch);... | notifyBranchWillChange |
42,352 | void (@Nullable String branchName) { if (branchName != null) { ApplicationManager.getApplication().invokeLater(() -> { if (myProject.isDisposed()) return; myProject.getMessageBus().syncPublisher(BranchChangeListener.VCS_BRANCH_CHANGED).branchHasChanged(branchName); }); } } | notifyBranchHasChanged |
42,353 | String (@NotNull GitRepository repository) { return myInitialRevisions.get(repository); } | getInitialRevision |
42,354 | void () { boolean ok = myUiHandler.showUnmergedFilesMessageWithRollback(getOperationName(), getRollbackProposal()); if (ok) { rollback(); } } | showUnmergedFilesDialogWithRollback |
42,355 | void () { myUiHandler.showUnmergedFilesNotification(getOperationName(), getRepositories()); } | showUnmergedFilesNotification |
42,356 | void (@NotNull String reference) { String title = GitBundle.message("branch.operation.could.not.0.operation.name.1.reference", getOperationName(), reference); if (wereSuccessful()) { showFatalErrorDialogWithRollback(title, ""); } } | fatalLocalChangesError |
42,357 | void (@NotNull VirtualFile root, @NotNull Collection<String> relativePaths) { String operationName = getOperationName(); if (wereSuccessful()) { boolean ok = myUiHandler.showUntrackedFilesDialogWithRollback(operationName, getRollbackProposal(), root, relativePaths); if (ok) { rollback(); } } else { myUiHandler.showUntr... | fatalUntrackedFilesError |
42,358 | String (@NotNull Map<GitRepository, String> heads) { MultiMap<String, VirtualFile> grouped = groupByBranches(heads); if (grouped.size() == 1) { return grouped.keySet().iterator().next(); } return StringUtil.join(grouped.entrySet(), entry -> { String roots = StringUtil.join(entry.getValue(), file -> file.getName(), ", "... | stringifyBranchesByRepos |
42,359 | void () { boolean fatalErrorHappened = false; while (hasMoreRepositories() && !fatalErrorHappened) { final GitRepository repository = next(); GitSimpleEventDetector notFullyMergedDetector = new GitSimpleEventDetector(GitSimpleEventDetector.Event.BRANCH_NOT_FULLY_MERGED); GitBranchNotMergedToUpstreamDetector notMergedTo... | execute |
42,360 | void () { boolean unmergedCommits = !myUnmergedToBranches.isEmpty(); HtmlBuilder message = new HtmlBuilder().appendRaw(GitBundle.message("delete.branch.operation.deleted.branch.bold", myBranchName)); if (unmergedCommits) { message.br().append(GitBundle.message("delete.branch.operation.unmerged.commits.were.discarded"))... | notifySuccess |
42,361 | boolean () { return myTrackedBranches.values().stream() .noneMatch(branch -> GitSharedSettings.getInstance(myProject).isBranchProtected(branch.getNameForRemoteOperations())); } | trackedBranchIsNotProtected |
42,362 | boolean (@NotNull Map<GitRepository, GitRemoteBranch> trackedBranches, @NotNull String localBranch) { for (GitRepository repository : trackedBranches.keySet()) { if (exists(repository.getBranchTrackInfos(), info -> !info.getLocalBranch().getName().equals(localBranch) && info.getRemoteBranch().equals(trackedBranches.get... | hasNoOtherTrackingBranch |
42,363 | void (GitRepository @NotNull ... repositories) { for (GitRepository repository : repositories) { repository.update(); } } | refresh |
42,364 | void () { GitCompoundResult result = doRollback(); if (!result.totalSuccess()) { myNotifier.notifyError(BRANCH_DELETION_ROLLBACK_ERROR, GitBundle.message("delete.branch.operation.error.during.rollback.of.branch.deletion"), result.getErrorOutputWithReposIndication(), true); } } | rollback |
42,365 | GitCompoundResult () { GitCompoundResult result = new GitCompoundResult(myProject); for (GitRepository repository : getSuccessfulRepositories()) { GitCommandResult res = myGit.branchCreate(repository, myBranchName, myDeletedBranchTips.get(repository)); result.append(repository, res); // restore tracking GitRemoteBranch... | doRollback |
42,366 | String () { return GitBundle.message("delete.branch.operation.deleted.branch", formatBranchName(myBranchName)); } | getSuccessMessage |
42,367 | String () { return new HtmlBuilder().append(GitBundle.message("delete.branch.operation.however.branch.deletion.has.succeeded.for.the.following", getSuccessfulRepositories().size())) .br() .appendRaw(successfulRepositoriesJoined()) .br() .append(GitBundle.message("delete.branch.operation.you.may.rollback.not.to.let.bran... | getRollbackProposal |
42,368 | String (@NotNull String name) { return bold(code(name)); } | formatBranchName |
42,369 | boolean (@NotNull Map<GitRepository, UnmergedBranchInfo> unmergedBranches) { Map<GitRepository, List<GitCommit>> history = new HashMap<>(); // we don't confuse user with the absence of repositories which branch was deleted w/o force, // we display no commits for them for (GitRepository repository : getRepositories()) {... | showNotFullyMergedDialog |
42,370 | List<GitCommit> (@NotNull GitRepository repository, @NotNull String branchName, @NotNull String baseBranch) { String range = baseBranch + ".." + branchName; try { return GitHistoryUtils.history(repository.getProject(), repository.getRoot(), range); } catch (VcsException e) { LOG.warn("Couldn't get `git log " + range + ... | getUnmergedCommits |
42,371 | void (String line, Key outputType) { Matcher matcher = PATTERN.matcher(line); if (matcher.matches()) { myBaseBranch = matcher.group(1); } } | onLineAvailable |
42,372 | void () { GitBrancher brancher = GitBrancher.getInstance(myProject); MultiMap<String, GitRepository> grouped = groupTrackedBranchesByName(); for (String remoteBranch : grouped.keySet()) { brancher.deleteRemoteBranch(remoteBranch, new ArrayList<>(grouped.get(remoteBranch))); } } | deleteTrackedBranchInBackground |
42,373 | void (@NotNull Notification notification) { new Task.Backgroundable(myProject, GitBundle.message("delete.branch.operation.restoring.branch.process", myBranchName)) { @Override public void run(@NotNull ProgressIndicator indicator) { rollbackBranchDeletion(notification); } }.queue(); } | restoreInBackground |
42,374 | void (@NotNull ProgressIndicator indicator) { rollbackBranchDeletion(notification); } | run |
42,375 | void (@NotNull Notification notification) { GitCompoundResult result = doRollback(); if (result.totalSuccess()) { notification.expire(); } else { myNotifier.notifyError(BRANCH_DELETION_ROLLBACK_ERROR, GitBundle.message("delete.branch.operation.could.not.restore.branch.error", formatBranchName(myBranchName)), result.get... | rollbackBranchDeletion |
42,376 | void (@NotNull Notification notification) { new Task.Backgroundable(myProject, GitBundle.message("delete.branch.operation.collecting.unmerged.commits.process")) { @Override public void run(@NotNull ProgressIndicator indicator) { boolean restore = showNotFullyMergedDialog(myUnmergedToBranches); if (restore) { rollbackBr... | viewUnmergedCommitsInBackground |
42,377 | void (@NotNull ProgressIndicator indicator) { boolean restore = showNotFullyMergedDialog(myUnmergedToBranches); if (restore) { rollbackBranchDeletion(notification); } } | run |
42,378 | GitBrancher (@NotNull Project project) { return project.getService(GitBrancher.class); } | getInstance |
42,379 | void () { String tagFullName = GitTag.REFS_TAGS_PREFIX + myTagName; int successRemotes = 0; int failureRemotes = 0; GitCompoundResult result = new GitCompoundResult(myProject); Collection<GitRepository> repositories = getRepositories(); for (GitRepository repository: repositories) { String expectedCommit = myRepositori... | execute |
42,380 | boolean (@NotNull String tagFullName, @NotNull List<String> lsRemoteOutput) { return ContainerUtil.exists(lsRemoteOutput, line -> { if (StringUtil.isEmptyOrSpaces(line)) return false; List<String> split = StringUtil.split(line, "\t"); if (split.size() != 2) return false; return tagFullName.equals(split.get(1)); }); } | hasTagOnRemote |
42,381 | void (@NotNull @NlsContexts.NotificationContent String message) { Notification notification = STANDARD_NOTIFICATION.createNotification(message, NotificationType.INFORMATION); notification.setDisplayId(GitNotificationIdsHolder.TAG_REMOTE_DELETION_SUCCESS); VcsNotifier.getInstance(myProject).notify(notification); } | notifySuccessWithEmptyTitle |
42,382 | void () { throw new UnsupportedOperationException(); } | rollback |
42,383 | String () { throw new UnsupportedOperationException(); } | getSuccessMessage |
42,384 | String () { throw new UnsupportedOperationException(); } | getRollbackProposal |
42,385 | String () { throw new UnsupportedOperationException(); } | getOperationName |
42,386 | void (@NotNull @NlsContexts.NotificationTitle String title, @NotNull @NlsContexts.NotificationContent String message) { VcsNotifier.getInstance(myProject).notifyError(BRANCH_OPERATION_ERROR, title, message); } | notifyError |
42,387 | boolean (final @NotNull String title, final @NotNull String message, final @NotNull String rollbackProposal) { final AtomicBoolean ok = new AtomicBoolean(); ApplicationManager.getApplication().invokeAndWait(() -> { StringBuilder description = new StringBuilder(); if (!StringUtil.isEmptyOrSpaces(message)) { description.... | notifyErrorWithRollbackProposal |
42,388 | void (final @NotNull String operationName, final @NotNull Collection<? extends GitRepository> repositories) { String title = unmergedFilesErrorTitle(operationName); String description = unmergedFilesErrorNotificationDescription(operationName); VcsNotifier.getInstance(myProject).notifyError( UNRESOLVED_CONFLICTS, title,... | showUnmergedFilesNotification |
42,389 | void (@NotNull Notification notification, @NotNull HyperlinkEvent event) { if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED && event.getDescription().equals(RESOLVE_HREF_ATTRIBUTE)) { new Task.Backgroundable(myProject, GitBundle.message("apply.changes.resolving.conflicts.progress.title")) { @Override publ... | hyperlinkUpdate |
42,390 | void (@NotNull ProgressIndicator indicator) { showMergeDialog(); } | run |
42,391 | void () { GitConflictResolver.Params params = new GitConflictResolver.Params(myProject). setMergeDescription(GitBundle.message("branch.ui.handler.merge.notification.description", operationName)). setErrorNotificationTitle(GitBundle.message("branch.ui.handler.merge.error.notification.title")); new GitConflictResolver(my... | showMergeDialog |
42,392 | boolean (@NotNull String operationName, final @NotNull String rollbackProposal) { final AtomicBoolean ok = new AtomicBoolean(); ApplicationManager.getApplication().invokeAndWait(() -> { String description = XmlStringUtil.wrapInHtml( GitBundle.message("branch.ui.handler.you.have.to.resolve.all.conflicts.before.operation... | showUnmergedFilesMessageWithRollback |
42,393 | void (@NotNull String operationName, @NotNull VirtualFile root, @NotNull Collection<String> relativePaths) { GitUntrackedFilesHelper.notifyUntrackedFilesOverwrittenBy(myProject, root, relativePaths, operationName, null); } | showUntrackedFilesNotification |
42,394 | boolean (@NotNull String operationName, final @NotNull String rollbackProposal, @NotNull VirtualFile root, final @NotNull Collection<String> relativePaths) { return GitUntrackedFilesHelper.showUntrackedFilesDialogWithRollback(myProject, operationName, rollbackProposal, root, relativePaths); } | showUntrackedFilesDialogWithRollback |
42,395 | ProgressIndicator () { return myProgressIndicator; } | getProgressIndicator |
42,396 | boolean (@NotNull Project project, @NotNull Map<GitRepository, List<GitCommit>> history, @NotNull Map<GitRepository, String> baseBranches, @NotNull String removedBranch) { AtomicBoolean restore = new AtomicBoolean(); ApplicationManager.getApplication().invokeAndWait(() -> restore.set( GitBranchIsNotFullyMergedDialog.sh... | showBranchIsNotFullyMergedDialog |
42,397 | DeleteRemoteBranchDecision (@NotNull List<String> branchNames, @NotNull Collection<@NlsSafe String> trackingBranches, @NotNull Collection<GitRepository> repositories) { boolean deleteMultipleBranches = branchNames.size() > 1; String title = GitBundle.message("branch.ui.handler.delete.remote.branches", branchNames.size(... | confirmRemoteBranchDeletion |
42,398 | void (boolean isSelected, int exitCode) { deleteChoice.set(isSelected); } | rememberChoice |
42,399 | String () { return checkboxMessage; } | getDoNotShowMessage |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.