Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
43,200
String (@NotNull DetailedLogData firstBlockSyncData) { return String .format("Last 100 commits:\n%s\nRefs:\n%s", printCommits(firstBlockSyncData.getCommits()), printRefs(firstBlockSyncData.getRefs())); }
printLogData
43,201
String (@NotNull List<? extends VcsCommitMetadata> commits) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < Math.min(commits.size(), 100); i++) { GraphCommit<Hash> commit = commits.get(i); sb.append( String .format("%s -> %s\n", commit.getId().toShortString(), StringUtil.join(commit.getParents(), Hash::to...
printCommits
43,202
String (@NotNull Set<? extends VcsRef> refs) { return StringUtil.join(refs, ref -> ref.getCommitHash().toShortString() + " : " + ref.getName(), "\n"); }
printRefs
43,203
void (@NotNull Set<? super VcsRef> allRefs, @NotNull Set<String> currentTags, @NotNull Collection<? extends VcsRef> previousRefs) { for (VcsRef ref : previousRefs) { if (!allRefs.contains(ref) && currentTags.contains(ref.getName())) { allRefs.add(ref); } } }
addOldStillExistingTags
43,204
boolean (@NotNull GitRepository repository) { return !repository.getInfo().isShallow(); }
shouldIncludeRootChanges
43,205
Set<VcsRef> (@NotNull GitRepository repository) { return computeWithSpan(myTracer, ReadingBranches.getName(), span -> { span.setAttribute("rootName", repository.getRoot().getName()); VirtualFile root = repository.getRoot(); repository.update(); GitBranchesCollection branches = repository.getBranches(); Collection<GitLo...
readBranches
43,206
VcsKey () { return GitVcs.getKey(); }
getSupportedVcs
43,207
VcsLogRefManager () { return myRefSorter; }
getReferenceManager
43,208
Disposable (@NotNull Collection<? extends VirtualFile> roots, @NotNull VcsLogRefresher refresher) { MessageBusConnection connection = myProject.getMessageBus().connect(); connection.subscribe(GitRepository.GIT_REPO_CHANGE, repository -> { TrackingUtil.trackActivity(myProject, VcsActivityKey.INSTANCE, () -> { VirtualFil...
subscribeToRootRefreshEvents
43,209
void (@Nullable String text, boolean regexp, boolean caseSensitive, @NotNull List<? super String> filterParameters) { if (text != null) { filterParameters.add(prepareParameter("grep", text)); } filterParameters.add(regexp ? "--extended-regexp" : "--fixed-strings"); if (!caseSensitive) { filterParameters.add("--regexp-i...
appendTextFilterParameters
43,210
VcsLogDiffHandler () { return new GitLogDiffHandler(myProject); }
getDiffHandler
43,211
VcsLogFileHistoryHandler () { return new GitLogHistoryHandler(myProject); }
getFileHistoryHandler
43,212
VirtualFile (@NotNull Project project, @NotNull VirtualFile detectedRoot, @NotNull FilePath path) { return getCorrectedVcsRoot(myRepositoryManager, detectedRoot, path); }
getVcsRoot
43,213
VcsLogIndexer () { return new GitLogIndexer(myProject, myRepositoryManager); }
getIndexer
43,214
String (String paramName, String value) { return "--" + paramName + "=" + value; // no value quoting needed, because the parameter itself will be quoted by GeneralCommandLine }
prepareParameter
43,215
VirtualFile (@NotNull GitRepositoryManager repositoryManager, @NotNull VirtualFile detectedRoot, @NotNull FilePath path) { if (path.isDirectory()) return detectedRoot; GitRepository repository = repositoryManager.getRepositoryForRootQuick(path); if (repository != null && repository.getRoot().equals(detectedRoot)) { Git...
getCorrectedVcsRoot
43,216
GitFetchSupport (@NotNull Project project) { return project.getService(GitFetchSupport.class); }
fetchSupport
43,217
void (@NotNull List<? extends VcsFullCommitDetails> commits) { ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator(); if (indicator != null) { indicator.setIndeterminate(false); } IntRef cherryPickedCommitsCount = new IntRef(1); new GitApplyChangesProcess(myProject, commits, true, GitBundle...
cherryPick
43,218
GitCommandResult ( @NotNull GitRepository repository, @NotNull VcsCommitMetadata commit, boolean autoCommit, @NotNull List<? extends GitLineHandlerListener> listeners, @Nullable ProgressIndicator indicator, int alreadyCherryPickedCount, int totalCommitsToCherryPick ) { if (indicator != null) { updateCherryPickIndicator...
cherryPickSingleCommit
43,219
void ( @NotNull ProgressIndicator indicator, @NotNull VcsCommitMetadata commit, int alreadyCherryPickedCount, int totalCommitsToCherryPick ) { if (totalCommitsToCherryPick > 1) { indicator.setText(DvcsBundle.message( "cherry.picking.process.commit", StringUtil.trimMiddle(commit.getSubject(), 30), alreadyCherryPickedCou...
updateCherryPickIndicatorText
43,220
boolean (@NotNull GitCommandResult result) { String stdout = result.getOutputAsJoinedString(); return stdout.contains("nothing to commit") || stdout.contains("previous cherry-pick is now empty"); }
isNothingToCommitMessage
43,221
String (@NotNull GitRepository repository, @NotNull VcsFullCommitDetails commit) { String message = commit.getFullMessage(); if (shouldAddSuffix(repository, commit.getId())) { message += String.format("\n\n(cherry picked from commit %s)", commit.getId().asString()); //NON-NLS Do not i18n commit template } return messag...
createCommitMessage
43,222
boolean (@NotNull GitRepository repository, @NotNull Hash commit) { return mySettings.shouldAddSuffixToCherryPicksOfPublishedCommits() && isCommitPublished(repository, commit); }
shouldAddSuffix
43,223
Unit (@NotNull GitRepository repository, boolean autoCommit) { if (autoCommit) { // `git cherry-pick -n` doesn't create the CHERRY_PICK_HEAD removeCherryPickHead(repository); } return Unit.INSTANCE; }
cancelCherryPick
43,224
void (@NotNull GitRepository repository) { File cherryPickHeadFile = repository.getRepositoryFiles().getCherryPickHead(); if (cherryPickHeadFile.exists()) { boolean deleted = FileUtil.delete(cherryPickHeadFile); if (!deleted) { LOG.warn("Couldn't delete " + cherryPickHeadFile); } } else { LOG.info("Cancel cherry-pick i...
removeCherryPickHead
43,225
VcsKey () { return GitVcs.getKey(); }
getSupportedVcs
43,226
boolean (@NotNull Collection<? extends VirtualFile> roots) { return ContainerUtil.all(roots, r -> myRepositoryManager.getRepositoryForRootQuick(r) != null); }
canHandleForRoots
43,227
void (String line, Key outputType) { if (outputType != ProcessOutputTypes.STDOUT) return; ContainerUtil.addIfNotNull(result, parseListFilesStagedRecord(root, line)); }
onLineAvailable
43,228
void (String line, Key outputType) { if (outputType != ProcessOutputTypes.STDOUT) return; ContainerUtil.addIfNotNull(result, parseListTreeRecord(root, line)); }
onLineAvailable
43,229
FilePath () { return myPath; }
getPath
43,230
String () { return myBlobHash; }
getBlobHash
43,231
boolean () { return myExecutable; }
isExecutable
43,232
String () { return myBlobHash; }
getBlobHash
43,233
boolean () { return myModifiable; }
isModifiable
43,234
long () { @NonNls String revisionNumber = getRevisionNumber().asString(); // TODO: wrong braces? return Long.parseLong(revisionNumber.substring(0, 15), 16) << 4 + Integer.parseInt(revisionNumber.substring(15, 16), 16); }
getNumber
43,235
GitRevisionNumber () { return (GitRevisionNumber)super.getRevisionNumber(); }
getRevisionNumber
43,236
AbstractVcs () { return myVcs; }
getVcs
43,237
void (@NotNull Project project) { GitRepositoryManager repositoryManager = GitRepositoryManager.getInstance(project); for (GitRepository repository : repositoryManager.getRepositories()) { repository.getUntrackedFilesHolder().invalidate(); } }
refresh
43,238
GitLineHandler (@NotNull Project project, @NotNull VirtualFile root, @NotNull @NonNls String reference) { GitLineHandler handler = new GitLineHandler(project, root, GitCommand.REV_LIST); handler.addParameters("--timestamp", "--max-count=1", reference); handler.endOptions(); handler.setSilent(true); return handler; }
createRefResolveHandler
43,239
Collection<Change> (@NotNull GitRepository repository, @NotNull @NonNls String oldRevision, @NotNull @NonNls String newRevision) { try { return getDiff(repository.getProject(), repository.getRoot(), oldRevision, newRevision, null, true, true); } catch (VcsException e) { LOG.info("Couldn't collect changes between " + ol...
getThreeDotDiff
43,240
FilePath () { @Nullable FilePath t = afterPath != null ? afterPath : beforePath; return Objects.requireNonNull(t); }
getFilePath
43,241
FileStatus () { return status; }
getStatus
43,242
JComponent () { return (JComponent)getStandardPanel(); }
getComponent
43,243
ChangesBrowserSettingsEditor<ChangeBrowserSettings> (boolean showDateFilter) { return new GitVersionFilterComponent(showDateFilter); }
createFilterUI
43,244
int () { return -1; }
getUnlimitedCountValue
43,245
GitCommittedChangeList (@NotNull Project project, @NotNull VcsFullCommitDetails gitCommit, @NotNull GitRevisionNumber revisionNumber) { return new GitCommittedChangeList(gitCommit.getFullMessage() + " (" + gitCommit.getId().toShortString() + ")", gitCommit.getFullMessage(), VcsUserUtil.toExactString(gitCommit.getAuthor...
createCommittedChangeList
43,246
boolean () { return false; }
supportsIncomingChanges
43,247
String () { return myUrl; }
toPresentableString
43,248
String () { return toPresentableString(); }
toString
43,249
String () { return myUrl; }
getKey
43,250
File () { return myRoot; }
getRoot
43,251
GitChangesSaver (@NotNull Project project, @NotNull Git git, @NotNull ProgressIndicator progressIndicator, @NotNull @Nls String stashMessage, @NotNull GitSaveChangesPolicy saveMethod) { if (saveMethod == GitSaveChangesPolicy.SHELVE) { return new GitShelveChangesSaver(project, git, progressIndicator, stashMessage); } re...
getSaver
43,252
void () { if (wereChangesSaved()) { LOG.info("Update is incomplete, changes are not restored"); VcsNotifier.getInstance(myProject).notifyImportantWarning( LOCAL_CHANGES_NOT_RESTORED, GitBundle.message("restore.notification.failed.title"), getSaveMethod().selectBundleMessage( GitBundle.message("restore.notification.fail...
notifyLocalChangesAreNotRestored
43,253
void (GitConflictResolver.Params params) { myParams = params; }
setConflictResolverParams
43,254
GitSaveChangesPolicy () { return mySaveMethod; }
getSaveMethod
43,255
String () { return GitBundle.message("save.load.conflict.dialog.diff.right.title"); }
getConflictRightPanelTitle
43,256
String () { return GitBundle.message("save.load.conflict.dialog.diff.left.title"); }
getConflictLeftPanelTitle
43,257
void (@NotNull Notification notification, @NotNull HyperlinkEvent event) { if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED && event.getDescription().equals("saver")) { showSavedChanges(); } }
hyperlinkUpdate
43,258
boolean (@NotNull GitCommandResult result) { return !StringUtil.containsIgnoreCase(result.getErrorOutputAsJoinedString(), NO_LOCAL_CHANGES_TO_SAVE) && !StringUtil.containsIgnoreCase(result.getOutputAsJoinedString(), NO_LOCAL_CHANGES_TO_SAVE); }
somethingWasStashed
43,259
void () { final String oldProgressTitle = myProgressIndicator.getText(); GitStashOperations.unstash(myProject, myStashedRoots, (root) -> { String message = GitBundle.message("stash.unstash.progress.indicator.title", root.getName()); myProgressIndicator.setText(message); GitLineHandler handler = new GitLineHandler(myPro...
load
43,260
boolean () { return !myStashedRoots.isEmpty(); }
wereChangesSaved
43,261
void () { GitUnstashDialog.showUnstashDialog(myProject, new ArrayList<>(myStashedRoots.keySet()), myStashedRoots.keySet().iterator().next()); }
showSavedChanges
43,262
String () { return "StashChangesSaver. Roots: " + myStashedRoots; }
toString
43,263
Params (@Nullable Params givenParams, Project project) { if (givenParams != null) { return givenParams; } Params params = new Params(project); params.setErrorNotificationTitle(GitBundle.message("preserving.process.local.changes.not.restored.error.title")); params.setMergeDialogCustomizer(new UnstashMergeDialogCustomize...
makeParamsOrUse
43,264
void () { VcsNotifier.getInstance(myProject).notifyImportantWarning( UNSTASH_WITH_CONFLICTS, GitBundle.message("stash.unstash.unresolved.conflict.warning.notification.title"), GitBundle.message("stash.unstash.unresolved.conflict.warning.notification.message"), new NotificationListener() { @Override public void hyperlin...
notifyUnresolvedRemain
43,265
void (@NotNull Notification notification, @NotNull HyperlinkEvent event) { if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { if (event.getDescription().equals("saver")) { // we don't use #showSavedChanges to specify unmerged root first GitUnstashDialog.showUnstashDialog(myProject, new ArrayList<>(myStas...
hyperlinkUpdate
43,266
String (@NotNull Collection<VirtualFile> files) { return GitBundle.message("stash.unstash.conflict.dialog.description.label.text"); }
getMultipleFileMergeDescription
43,267
String (@NotNull VirtualFile file) { return getConflictLeftPanelTitle(); }
getLeftPanelTitle
43,268
String (@NotNull VirtualFile file, VcsRevisionNumber revisionNumber) { return getConflictRightPanelTitle(); }
getRightPanelTitle
43,269
void (@NotNull Collection<? extends VirtualFile> rootsToSave, @NotNull Collection<Change> shelvedChanges) { rollbackChanges(rootsToSave, shelvedChanges); }
doRollback
43,270
void () { myVcsShelveChangesSaver.load(); }
load
43,271
boolean () { List<ShelvedChangeList> shelvedLists = myVcsShelveChangesSaver.getShelvedLists(); return !shelvedLists.isEmpty(); }
wereChangesSaved
43,272
void () { List<ShelvedChangeList> shelvedLists = myVcsShelveChangesSaver.getShelvedLists(); if (!shelvedLists.isEmpty()) { Comparator<ShelvedChangeList> nameComparator = Comparator.comparing(it -> it.getDisplayName(), String.CASE_INSENSITIVE_ORDER); List<ShelvedChangeList> sorted = ContainerUtil.sorted(shelvedLists, na...
showSavedChanges
43,273
void (@NotNull Collection<? extends VirtualFile> rootsToSave, @NotNull Collection<Change> shelvedChanges) { if (GitVersionSpecialty.RESTORE_SUPPORTED.existsIn(myProject)) { Set<FilePath> filePaths = new HashSet<>(); for (Change change : shelvedChanges) { ContainerUtil.addAllNotNull(filePaths, ChangesUtil.getBeforePath(...
rollbackChanges
43,274
void (@NotNull Project project, @NotNull VirtualFile root) { GitLineHandler handler = new GitLineHandler(project, root, GitCommand.RESET); handler.addParameters("--hard"); handler.endOptions(); GitCommandResult result = Git.getInstance().runCommand(handler); if (!result.success()) { LOG.warn("Can't reset changes:" + re...
resetHardLocal
43,275
void (@NotNull Project project, @NotNull VirtualFile root, @NotNull List<FilePath> filePaths) { for (List<String> paths : VcsFileUtil.chunkPaths(root, filePaths)) { GitLineHandler handler = new GitLineHandler(project, root, GitCommand.RESTORE); handler.addParameters("--staged", "--worktree", "--source=HEAD"); handler.e...
restoreStagedWorktree
43,276
GitFetchResult (@NotNull GitRepository repository) { // TODO need to have a fair compound result here GitFetchResult fetchResult = myFetchAll ? fetchAll(repository) : fetchCurrentRemote(repository); repository.update(); repository.getRepositoryFiles().refreshTagsFiles(); return fetchResult; }
fetch
43,277
GitFetchResult (@NotNull VirtualFile root, @NotNull String remoteName, @Nullable String branch) { GitRepository repository = myRepositoryManager.getRepositoryForRoot(root); if (repository == null) { return logError("Repository can't be null for " + root, myRepositoryManager.toString()); } GitRemote remote = GitUtil.fin...
fetch
43,278
GitFetchResult (@NotNull String message, @Nullable String additionalInfo) { String addInfo = additionalInfo != null ? "\n" + additionalInfo : ""; LOG.error(message + addInfo); return GitFetchResult.error(message); }
logError
43,279
GitFetchResult (@NotNull GitRepository repository) { FetchParams fetchParams = getFetchParams(repository); if (fetchParams.isError()) { return fetchParams.getError(); } GitRemote remote = fetchParams.getRemote(); return fetchRemote(repository, remote, null); }
fetchCurrentRemote
43,280
GitFetchResult (@NotNull GitRepository repository, @NotNull GitRemote remote, @Nullable String branch) { return fetchNatively(repository, remote, branch); }
fetchRemote
43,281
GitFetchResult (@NotNull GitRepository repository) { FetchParams fetchParams = getFetchParams(repository); if (fetchParams.isError()) { return fetchParams.getError(); } GitRemote remote = fetchParams.getRemote(); String remoteBranch = fetchParams.getRemoteBranch().getNameForRemoteOperations(); return fetchNatively(repo...
fetchCurrentBranch
43,282
FetchParams (@NotNull GitRepository repository) { GitLocalBranch currentBranch = repository.getCurrentBranch(); if (currentBranch == null) { // fetching current branch is called from Update Project and Push, where branch tracking is pre-checked String message = "Current branch can't be null here. \nRepository: " + repo...
getFetchParams
43,283
GitFetchResult (@NotNull GitRepository repository) { GitFetchResult fetchResult = GitFetchResult.success(); for (GitRemote remote : repository.getRemotes()) { String url = remote.getFirstUrl(); if (url == null) { LOG.error("URL is null for remote " + remote.getName()); continue; } GitFetchResult res = fetchNatively(rep...
fetchAll
43,284
GitFetchResult (@NotNull GitRepository repository, @NotNull GitRemote remote, @Nullable String branch) { Git git = Git.getInstance(); String[] additionalParams = branch != null ? new String[]{getFetchSpecForBranch(branch, remote.getName())} : ArrayUtilRt.EMPTY_STRING_ARRAY; GitFetchPruneDetector pruneDetector = new Git...
fetchNatively
43,285
String (String branch) { if (branch.startsWith(REFS_HEADS_PREFIX)) { return branch.substring(REFS_HEADS_PREFIX.length()); } return branch; }
getRidOfPrefixIfExists
43,286
String (@NotNull String branch, @NotNull String remoteName) { branch = getRidOfPrefixIfExists(branch); return REFS_HEADS_PREFIX + branch + ":" + REFS_REMOTES_PREFIX + remoteName + "/" + branch; }
getFetchSpecForBranch
43,287
Collection<Exception> () { return myErrors; }
getErrors
43,288
void (@NotNull Project project, @NotNull GitFetchResult result, @Nullable @NlsContexts.NotificationTitle String errorNotificationTitle, @NotNull Collection<? extends Exception> errors) { VcsNotifier notifier = VcsNotifier.getInstance(project); if (result.isSuccess()) { notifier.notifySuccess(FETCH_SUCCESS, "", GitBundl...
displayFetchResult
43,289
boolean (@NotNull Collection<? extends GitRepository> roots, @Nullable @NlsContexts.NotificationTitle String errorNotificationTitle, boolean notifySuccess) { MultiRootMessage additionalInfo = new MultiRootMessage(myProject, GitUtil.getRootsFromRepositories(roots), false, true); for (GitRepository repository : roots) { ...
fetchRootsAndNotify
43,290
void (String line, Key outputType) { // x [deleted] (none) -> origin/frmari Matcher matcher = PRUNE_PATTERN.matcher(line); if (matcher.matches()) { myPrunedRefs.add(matcher.group(1)); } }
onLineAvailable
43,291
Collection<String> () { return myPrunedRefs; }
getPrunedRefs
43,292
GitFetchResult () { return myError; }
getError
43,293
GitRemote () { return myRemote; }
getRemote
43,294
GitRemoteBranch () { return myRemoteBranch; }
getRemoteBranch
43,295
List<List<String>> (@NotNull String filterName) { return getCommonProperties().getRecentlyFilteredGroups(filterName); }
getRecentlyFilteredGroups
43,296
void (@NotNull String filterName, @NotNull Collection<String> values) { getCommonProperties().addRecentlyFilteredGroup(filterName, values); }
addRecentlyFilteredGroup
43,297
VcsLogProjectTabsProperties () { return myProject.getService(VcsLogProjectTabsProperties.class); }
getCommonProperties
43,298
boolean () { return this == SUCCESS || this == SUCCESS_WITH_RESOLVED_CONFLICTS || this == INCOMPLETE || this == NOTHING_TO_UPDATE; }
isSuccess
43,299
GitUpdateResult (@NotNull GitUpdateResult next) { if (myPriority >= next.myPriority) { return this; } return next; }
join