Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
43,500
void () { notifyWarning(GitBundle.message("merge.unresolved.conflicts.remaining.notification.title"), myParams.myErrorNotificationAdditionalDescription); }
notifyUnresolvedRemainAfterNotification
43,501
void (@NotificationTitle @NotNull String title, @NotificationContent @NotNull String content) { Notification notification = IMPORTANT_ERROR_NOTIFICATION.createNotification(title, content, NotificationType.WARNING); notification.setDisplayId(CANNOT_RESOLVE_CONFLICT); notification.addAction(NotificationAction.createSimpl...
notifyWarning
43,502
boolean (boolean mergeDialogInvokedFromNotification) { try { final Collection<VirtualFile> initiallyUnmergedFiles = getUnmergedFiles(myRoots); if (initiallyUnmergedFiles.isEmpty()) { LOG.info("merge: no unmerged files"); return mergeDialogInvokedFromNotification || proceedIfNothingToMerge(); } else { showMergeDialog(in...
merge
43,503
void (@NotNull Collection<? extends VirtualFile> initiallyUnmergedFiles) { TransactionGuard.getInstance().assertWriteSafeContext(ModalityState.defaultModalityState()); ApplicationManager.getApplication().invokeAndWait(() -> { MergeProvider mergeProvider = new GitMergeProvider(myProject, myParams.reverse); myVcsHelper.s...
showMergeDialog
43,504
void (@NotNull VcsException e) { LOG.info("mergeFiles ", e); final String description = GitBundle.message( "conflict.resolver.unmerged.files.check.error.notification.description.text", myParams.myErrorNotificationAdditionalDescription ); VcsNotifier.getInstance(myProject).notifyError( CONFLICT_RESOLVING_ERROR, myParams...
notifyException
43,505
MergeProvider (@NotNull Project project) { return new GitMergeProvider(project, findReverseRoots(project, ReverseRequest.DETECT)); }
detect
43,506
Project () { return myProject; }
getProject
43,507
Set<VirtualFile> (@NotNull Project project, @NotNull ReverseRequest reverseOrDetect) { if (Registry.is("git.do.not.swap.merge.conflict.sides")) return Collections.emptySet(); Set<VirtualFile> reverseMap = new HashSet<>(); for (GitRepository repository : GitUtil.getRepositoryManager(project).getRepositories()) { boolean...
findReverseRoots
43,508
void (@NotNull VirtualFile file) { try { GitFileUtils.addFilesForce(myProject, GitUtil.getRootForFile(myProject, file), Collections.singletonList(file)); } catch (VcsException e) { LOG.error("Confirming conflict resolution failed", e); } }
conflictResolvedForFile
43,509
boolean (@NotNull VirtualFile file) { return file.getFileType().isBinary(); }
isBinary
43,510
MergeSession (@NotNull List<VirtualFile> files) { return ProgressManager.getInstance().runProcessWithProgressSynchronously( () -> new MyMergeSession(files), GitBundle.message("merge.progress.indicator.loading.unmerged.files.title"), true, myProject ); }
createMergeSession
43,511
MergeDialogCustomizer () { return new GitDefaultMergeDialogCustomizer(myProject); }
createDefaultMergeDialogCustomizer
43,512
boolean (@NotNull VirtualFile file) { GitConflict c = myConflicts.get(file); return c != null && !file.isDirectory(); }
canMerge
43,513
void (@NotNull VirtualFile file, @NotNull Resolution resolution) { conflictResolvedForFiles(Collections.singletonList(file), resolution); }
conflictResolvedForFile
43,514
void (@NotNull List<? extends VirtualFile> files, @NotNull Resolution resolution) { MultiMap<VirtualFile, GitConflict> byRoot = groupConflictsByRoot(files); for (VirtualFile root : byRoot.keySet()) { Collection<GitConflict> conflicts = byRoot.get(root); ConflictSide resolutionSide = resolution != Resolution.Merged ? ge...
conflictResolvedForFiles
43,515
ConflictSide (@NotNull Resolution resolution, @NotNull VirtualFile root) { assert resolution == Resolution.AcceptedYours || resolution == Resolution.AcceptedTheirs; boolean isReversed = myReverseRoots.contains(root); boolean acceptYours = !isReversed ? resolution == Resolution.AcceptedYours : resolution == Resolution.A...
getAcceptedConflictSide
43,516
String (VirtualFile file) { GitConflict c = myConflicts.get(file); if (c == null) { return ""; } boolean isReversed = myReverseRoots.contains(c.getRoot()); GitConflict.Status currentStatus = c.getStatus(ConflictSide.OURS, isReversed); GitConflict.Status lastStatus = c.getStatus(ConflictSide.THEIRS, isReversed); GitConf...
valueOf
43,517
String () { return GitBundle.message("merge.tool.column.status.modified"); }
getMaxStringValue
43,518
int () { return 10; }
getAdditionalWidth
43,519
void (@NotNull UpdatedFiles updates, @NotNull String groupId, @NotNull Set<String> paths) { FileGroup fileGroup = updates.getGroupById(groupId); for (String path : paths) { fileGroup.add(path, GitVcs.getKey(), null); } }
addAll
43,520
void (String line, Key outputType) { if (outputType != ProcessOutputTypes.STDOUT) return; if (!line.contains(blob)) return; if (pathAmbiguous[0]) return; GitIndexUtil.StagedFileOrDirectory stagedFile = GitIndexUtil.parseListTreeRecord(root, line); if (stagedFile instanceof GitIndexUtil.StagedFile && blob.equals(((GitIn...
onLineAvailable
43,521
boolean (@NotNull GitRepository repository) { if (Registry.is("git.do.not.swap.merge.conflict.sides")) return false; return repository.getState().equals(GitRepository.State.REBASING); }
isReverseRoot
43,522
boolean () { return true; }
isRefreshAfterCommitNeeded
43,523
RefreshableOnComponent (@NotNull CheckinProjectPanel commitPanel, @NotNull CommitContext commitContext) { return new GitCheckinOptions(commitPanel, commitContext, isAmendCommitOptionSupported(commitPanel, this)); }
createCommitOptions
43,524
String () { return null; }
getHelpId
43,525
String () { return GitBundle.message("commit.action.name"); }
getCheckinOperationName
43,526
boolean () { return getAmendService().isAmendCommitSupported(); }
isAmendCommitSupported
43,527
CancellablePromise<EditedCommitDetails> (@NotNull VirtualFile root) { return getAmendService().getAmendCommitDetails(root); }
getAmendCommitDetails
43,528
GitAmendCommitService () { return myProject.getService(GitAmendCommitService.class); }
getAmendService
43,529
void (@NotNull CommitContext commitContext) { myNextCommitAmend = isAmendCommitMode(commitContext); myNextCommitSkipHook = isSkipHooks(commitContext); myNextCommitAuthor = getCommitAuthor(commitContext); myNextCommitAuthorDate = getCommitAuthorDate(commitContext); myNextCommitSignOff = isSignOffCommit(commitContext); m...
updateState
43,530
List<VcsException> (@NotNull List<? extends Change> changes, @NotNull @NonNls String commitMessage, @NotNull CommitContext commitContext, @NotNull Set<? super String> feedback) { updateState(commitContext); List<VcsException> exceptions = new ArrayList<>(); Map<GitRepository, Collection<Change>> sortedChanges = sortCha...
commit
43,531
List<GitRepository> (@NotNull Collection<GitRepository> changesRepositories, @NotNull Collection<VcsRoot> noChangesRoots) { GitRepositoryManager repositoryManager = getRepositoryManager(myProject); GitVcs vcs = GitVcs.getInstance(myProject); Collection<GitRepository> noChangesRepositories = getRepositoriesFromRoots(rep...
collectRepositories
43,532
List<VcsException> (@NotNull GitRepository repository, @NotNull Collection<? extends CommitChange> changes, @NotNull @NonNls String message, @NotNull CommitContext commitContext) { List<VcsException> exceptions = new ArrayList<>(); VirtualFile root = repository.getRoot(); try { // Stage partial changes Pair<List<Partia...
commitRepository
43,533
List<VcsException> (@NotNull Project project, @NotNull GitRepository repository, @NotNull Collection<? extends ChangedPath> rootChanges, @NotNull Set<? extends ChangedPath> changedWithIndex, @NotNull File messageFile, @NotNull GitCommitOptions commitOptions) { List<VcsException> exceptions = new ArrayList<>(); try { Se...
commitUsingIndex
43,534
GitCommitOptions () { return new GitCommitOptions(myNextCommitAmend, myNextCommitSignOff, myNextCommitSkipHook, myNextCommitAuthor, myNextCommitAuthorDate, myNextCleanupCommitMessage); }
createCommitOptions
43,535
void (@NotNull List<PartialCommitHelper> partialCommitHelpers) { ApplicationManager.getApplication().invokeLater(() -> { for (PartialCommitHelper helper : partialCommitHelpers) { try { helper.applyChanges(); } catch (Throwable e) { LOG.error(e); } } }); }
applyPartialChanges
43,536
List<CommitChange> (@NotNull GitRepository repository, @NotNull Collection<? extends CommitChange> changes, @NotNull Set<CommitChange> alreadyProcessed, @NotNull List<? super VcsException> exceptions) { if (SystemInfo.isFileSystemCaseSensitive) return Collections.emptyList(); List<CommitChange> caseOnlyRenames = filter...
addCaseOnlyRenamesToIndex
43,537
boolean (@NotNull ChangedPath change) { if (SystemInfo.isFileSystemCaseSensitive) return false; if (!change.isMove()) return false; FilePath afterPath = Objects.requireNonNull(change.afterPath); FilePath beforePath = Objects.requireNonNull(change.beforePath); return isCaseOnlyChange(beforePath.getPath(), afterPath.getP...
isCaseOnlyRename
43,538
List<FilePath> (@NotNull Collection<? extends ChangedPath> changes) { List<FilePath> files = new ArrayList<>(); for (ChangedPath change : changes) { if (CASE_SENSITIVE_FILE_PATH_HASHING_STRATEGY.equals(change.beforePath, change.afterPath)) { addIfNotNull(files, change.beforePath); } else { addIfNotNull(files, change.be...
getPaths
43,539
void (@NotNull Collection<? extends GitDiffChange> changes, @NotNull Set<FilePath> added, @NotNull Set<FilePath> removed, @NotNull PairConsumer<? super FilePath, ? super FilePath> function) { for (GitDiffChange change : changes) { FilePath before = change.getBeforePath(); FilePath after = change.getAfterPath(); if (rem...
processExcludedPaths
43,540
String (String message) { List<LinkMatch> matches = IssueNavigationConfiguration.getInstance(myProject).findIssueLinks(message); StringBuilder builder = new StringBuilder(); for (LinkMatch match : matches) { String issueId = match.getRange().substring(message); builder.append(issueId).append("\n"); } return builder.toS...
getIssueLinks
43,541
List<Movement> (@NotNull Collection<? extends Movement> explicitMoves, @NotNull Collection<? extends CommitChange> changes) { HashMultiset<FilePath> movedPathsMultiSet = HashMultiset.create(); for (Movement move : explicitMoves) { movedPathsMultiSet.add(move.getBefore()); movedPathsMultiSet.add(move.getAfter()); } Hash...
filterExcludedChanges
43,542
List<CommitChange> (@NotNull Collection<Change> changes) { List<CommitChange> result = new ArrayList<>(); MultiMap<VirtualFile, CommitChange> map = new MultiMap<>(); for (Change change : changes) { CommitChange commitChange = createCommitChange(change); if (commitChange.virtualFile != null) { map.putValue(commitChange....
collectChangesToCommit
43,543
CommitChange (@NotNull Change change) { FilePath beforePath = getBeforePath(change); FilePath afterPath = getAfterPath(change); ContentRevision bRev = change.getBeforeRevision(); ContentRevision aRev = change.getAfterRevision(); VcsRevisionNumber beforeRevision = bRev != null ? bRev.getRevisionNumber() : null; VcsRevis...
createCommitChange
43,544
void (@NotNull Project project, @NotNull VirtualFile root, @NotNull Collection<? extends ChangedPath> changes, @NotNull Set<FilePath> unstagedDeletions) { List<VcsException> restoreExceptions = new ArrayList<>(); Set<FilePath> toAdd = new HashSet<>(); Set<FilePath> toRemove = new HashSet<>(); for (ChangedPath change : ...
restoreExcluded
43,545
boolean (@NotNull Project project, @NotNull VirtualFile root, @NotNull ChangedPath change, @NotNull List<? super VcsException> exceptions) { try { if (!isCaseOnlyRename(change)) return false; FilePath beforePath = Objects.requireNonNull(change.beforePath); FilePath afterPath = Objects.requireNonNull(change.afterPath); ...
addAsCaseOnlyRename
43,546
void (final Project project, final VirtualFile root, final Collection<? extends FilePath> added, final Collection<? extends FilePath> removed, final List<? super VcsException> exceptions) { if (!removed.isEmpty()) { try { GitFileUtils.deletePaths(project, root, removed, "--ignore-unmatch", "--cached", "-r"); } catch (V...
updateIndex
43,547
List<VcsException> (@NotNull List<? extends FilePath> files) { ArrayList<VcsException> rc = new ArrayList<>(); Map<VirtualFile, List<FilePath>> sortedFiles; try { sortedFiles = sortFilePathsByGitRoot(myProject, files); } catch (VcsException e) { rc.add(e); return rc; } for (Map.Entry<VirtualFile, List<FilePath>> e : so...
scheduleMissingFileForDeletion
43,548
List<VcsException> (@NotNull List<? extends VirtualFile> files) { ArrayList<VcsException> rc = new ArrayList<>(); Map<VirtualFile, List<VirtualFile>> sortedFiles; try { sortedFiles = sortFilesByGitRoot(myProject, files); } catch (VcsException e) { rc.add(e); return rc; } for (Map.Entry<VirtualFile, List<VirtualFile>> e...
scheduleUnversionedFilesForAddition
43,549
PostCommitChangeConverter () { return new GitPostCommitChangeConverter(myProject); }
getPostCommitChangeConverter
43,550
void (final VirtualFile root) { // Note that the root is invalidated because changes are detected per-root anyway. // Otherwise it is not possible to detect moves. VcsDirtyScopeManager.getInstance(myProject).dirDirtyRecursively(root); }
markRootDirty
43,551
boolean () { return myOptionsUi.getAmendHandler().isAmendCommitMode(); }
isAmend
43,552
JComponent () { return myOptionsUi.getComponent(); }
getComponent
43,553
void () { myOptionsUi.restoreState(); }
restoreState
43,554
void () { myOptionsUi.saveState(); }
saveState
43,555
void (@NotNull LocalChangeList list) { myOptionsUi.onChangeListSelected(list); }
onChangeListSelected
43,556
void () { }
dispose
43,557
List<GitCheckinExplicitMovementProvider> (@NotNull Project project) { List<GitCheckinExplicitMovementProvider> allProviders = GitCheckinExplicitMovementProvider.EP_NAME.getExtensionList(); List<GitCheckinExplicitMovementProvider> enabledProviders = filter(allProviders, it -> it.isEnabled(project)); if (enabledProviders...
collectActiveMovementProviders
43,558
boolean () { if (beforePath == null || afterPath == null) return false; return !CASE_SENSITIVE_FILE_PATH_HASHING_STRATEGY.equals(beforePath, afterPath); }
isMove
43,559
JPanel () { myDontShowAgainCheckbox = new JCheckBox(GitBundle.message("push.dialog.preview.commits.before.push")); myDontShowAgainCheckbox.setSelected(GitVcsSettings.getInstance(myProject).shouldPreviewPushOnCommitAndPush()); JPanel basePanel = super.createOptionsPanel(); if (PushUtils.getProhibitedTarget(this) != null...
createOptionsPanel
43,560
void (boolean forcePush) { if (!myDontShowAgainCheckbox.isSelected()) { GitVcsSettings settings = GitVcsSettings.getInstance(myProject); if (settings.shouldPreviewPushOnCommitAndPush()) { settings.setPreviewPushProtectedOnly(true); } } super.push(forcePush); }
push
43,561
void () { boolean hasProtectedBranch = PushUtils.getProhibitedTarget(this) != null; GitVcsSettings vcsSettings = GitVcsSettings.getInstance(myProject); boolean showDialog = vcsSettings.shouldPreviewPushOnCommitAndPush(); boolean showOnlyProtected = vcsSettings.isPreviewPushProtectedOnly(); if (showDialog && (!showOnlyP...
showOrPush
43,562
void (@NotNull Project project, @NotNull Collection<GitRepository> selectedRepositories) { ModalityState modality = ModalityState.defaultModalityState(); TransactionGuard.getInstance().assertWriteSafeContext(modality); List<GitRepository> repositories = new ArrayList<>(selectedRepositories); ModalityUiUtil.invokeLaterI...
showOrPush
43,563
void (@NotNull Project project, @NotNull List<Couple<FilePath>> movedPaths) { }
afterMovementsCommitted
43,564
FilePath () { return myBeforePath; }
getBefore
43,565
FilePath () { return myAfterPath; }
getAfter
43,566
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Movement movement = (Movement)o; return Objects.equals(myBeforePath, movement.myBeforePath) && Objects.equals(myAfterPath, movement.myAfterPath); }
equals
43,567
int () { return Objects.hash(myBeforePath, myAfterPath); }
hashCode
43,568
DvcsRememberedInputs () { return ApplicationManager.getApplication().getService(GitRememberedInputs.class); }
getInstance
43,569
boolean (VirtualFile file) { FileStatus status = ChangeListManager.getInstance(myProject).getStatus(file); return status == FileStatus.NOT_CHANGED || status == FileStatus.DELETED || status == FileStatus.MODIFIED || status == FileStatus.MERGED_WITH_CONFLICTS; }
hasGoodFileStatus
43,570
ItemLatestState (FilePath filePath) { if (filePath.isDirectory()) { return null; } final VirtualFile vf = filePath.getVirtualFile(); if (vf != null) { if (!hasGoodFileStatus(vf)) { return null; } } try { return GitHistoryUtils.getLastRevision(myProject, filePath); } catch (VcsException e) { return null; } }
getLastRevision
43,571
VcsRevisionNumber (VirtualFile vcsRoot) { // todo return null; }
getLatestCommittedRevision
43,572
void (@NotNull VirtualFile root, @NotNull Collection<Change> revisions) { new GitRevisionContentPreLoader(myProject).preload(root, revisions); }
preloadBaseRevisions
43,573
boolean () { return true; }
canCompareWithWorkingDir
43,574
void (@NotNull Project project, @NotNull Disposable disposable) { ApplicationManager.getApplication().getMessageBus() .connect(disposable) .subscribe(AdvancedSettingsChangeListener.TOPIC, new AdvancedSettingsChangeListener() { @Override public void advancedSettingChanged(@NotNull String id, @NotNull Object oldValue, @N...
registerListener
43,575
void (@NotNull String id, @NotNull Object oldValue, @NotNull Object newValue) { if (id.equals(GitFileUtils.READ_CONTENT_WITH)) { ProjectLevelVcsManager.getInstance(project).getContentRevisionCache().clearConstantCache(); } }
advancedSettingChanged
43,576
String (LineInfo info) { Date date = getDate(info); return FileAnnotation.formatDate(date); }
doGetValue
43,577
String (LineInfo lineInfo) { return lineInfo.getRevisionNumber().getShortRev(); }
doGetValue
43,578
String (LineInfo lineInfo) { return VcsUserUtil.toExactString(lineInfo.getAuthorUser()); }
doGetValue
43,579
Date (LineInfo info) { VcsLogApplicationSettings logSettings = ApplicationManager.getApplication().getService(VcsLogApplicationSettings.class); return Boolean.TRUE.equals(logSettings.get(CommonUiProperties.PREFER_COMMIT_DATE)) ? info.getCommitterDate() : info.getAuthorDate(); }
getDate
43,580
void (@NotNull List<VcsFileRevision> revisions) { myRevisions = revisions; myRevisionMap = new Object2IntOpenHashMap<>(); for (int i = 0; i < myRevisions.size(); i++) { myRevisionMap.put(myRevisions.get(i).getRevisionNumber(), i); } }
setRevisions
43,581
void (@NotNull VcsRevisionNumber revisionNumber, @NotNull String message) { myCommitMessageMap.put(revisionNumber, message); }
setCommitMessage
43,582
int () { return myLines.size(); }
getLineCount
43,583
boolean (int lineNumber) { return myLines.size() <= lineNumber || lineNumber < 0; }
lineNumberCheck
43,584
List<LineInfo> () { return myLines; }
getLines
43,585
String (int lineNumber) { if (lineNumberCheck(lineNumber)) { return ""; } else { return doGetValue(myLines.get(lineNumber)); } }
getValue
43,586
void (int lineNum) { if (lineNum >= 0 && lineNum < myLines.size()) { LineInfo info = myLines.get(lineNum); VirtualFile root = ProjectLevelVcsManager.getInstance(myProject).getVcsRootFor(myFilePath); if (root == null) return; CompletableFuture<Boolean> shownInLog; if (ModalityState.current() == ModalityState.nonModal() ...
showAffectedPaths
43,587
GitRevisionNumber () { return myRevision; }
getRevisionNumber
43,588
FilePath () { return myFilePath; }
getFilePath
43,589
VcsFileRevision () { return new GitFileRevision(myProject, myFilePath, myRevision); }
getFileRevision
43,590
Date () { return myCommitterDate; }
getCommitterDate
43,591
Date () { return myAuthorDate; }
getAuthorDate
43,592
VcsUser () { return myAuthor; }
getAuthorUser
43,593
int () { return myLineNumber; }
getLineNumber
43,594
int () { return myOriginalLineNumber; }
getOriginalLineNumber
43,595
GitRevisionNumber () { return myCommitInfo.getRevisionNumber(); }
getRevisionNumber
43,596
FilePath () { return myCommitInfo.getFilePath(); }
getFilePath
43,597
VcsFileRevision () { return myCommitInfo.getFileRevision(); }
getFileRevision
43,598
Date () { return myCommitInfo.getCommitterDate(); }
getCommitterDate
43,599
Date () { return myCommitInfo.getAuthorDate(); }
getAuthorDate