Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
43,000 | boolean () { return myResult.isEmpty(); } | isEmpty |
43,001 | void (@NotNull CharSequence line) { if (line.isEmpty()) return; List<String> match = parsePathsLine(line); if (match.isEmpty()) { // ignore } else { if (myNameStatusOption != NameStatus.STATUS) throwGFE("Status list not expected", line); if (match.size() < 2) { myErrorText = getErrorText(line); } else { if (match.size(... | parseLine |
43,002 | String (@NotNull CharSequence line) { return "Could not parse status line [" + line + "]"; } | getErrorText |
43,003 | void (@NotNull String type, @NotNull String firstPath, @Nullable String secondPath) { myRecordBuilder.addPath(GitChangesParser.getChangeType(GitChangeType.fromString(type)), tryUnescapePath(firstPath), tryUnescapePath(secondPath)); } | addPath |
43,004 | List<String> (@NotNull CharSequence line) { int offset = 0; List<String> result = new ArrayList<>(); while (offset < line.length()) { int tokenEnd = StringUtil.indexOf(line, '\t', offset); if (tokenEnd == -1) tokenEnd = line.length(); result.add(line.subSequence(offset, tokenEnd).toString()); offset = tokenEnd + 1; } r... | parsePathsLine |
43,005 | boolean () { return myNameStatusOption == NameStatus.STATUS; } | expectsPaths |
43,006 | void () { myErrorText = null; } | clear |
43,007 | String (@NotNull CharSequence line) { return super.getErrorText(line) + " for record " + myOptionsParser.myResult.getResult(); } | getErrorText |
43,008 | void (char c) { myCurrentItem.append(c); } | append |
43,009 | void () { myResult.add(myCurrentItem.toString()); myCurrentItem.setLength(0); } | finishItem |
43,010 | List<String> () { return myResult; } | getResult |
43,011 | void () { myCurrentItem.setLength(0); myResult = new ArrayList<>(); } | clear |
43,012 | boolean () { return myResult.isEmpty() && myCurrentItem.isEmpty(); } | isEmpty |
43,013 | Collection<String> () { LinkedHashSet<String> result = new LinkedHashSet<>(); for (VcsFileStatusInfo info : myStatusInfo) { result.add(info.getFirstPath()); if (info.getSecondPath() != null) result.add(info.getSecondPath()); } return result; } | getPaths |
43,014 | String () { return String.format("GitLogRecord{myOptions=%s, myStatusInfo=%s, mySupportsRawBody=%s, myHandler=%s}", myOptions, myStatusInfo, mySupportsRawBody, myHandler); } | toString |
43,015 | List<Change> (@NotNull Project project, @NotNull VirtualFile root, @NotNull List<VcsFileStatusInfo> statusInfos, @NotNull String hash, @NotNull Date date, @Nullable String parentsHash) { GitRevisionNumber thisRevision = new GitRevisionNumber(hash, date); GitRevisionNumber parentRevision = parentsHash == null ? null : n... | parse |
43,016 | Change (@NotNull Project project, @NotNull VirtualFile vcsRoot, @NotNull VcsRevisionNumber thisRevision, @Nullable VcsRevisionNumber parentRevision, @NotNull VcsFileStatusInfo statusInfo) { final ContentRevision before; final ContentRevision after; final String path = statusInfo.getFirstPath(); final FilePath filePath ... | parseChange |
43,017 | void (@NotNull R record) { if (!record.getHash().equals(myLastHash)) { processCollectedRecords(); } myLastHash = record.getHash(); myHashToRecord.putValue(record.getHash(), record); String[] parents = record.getParentsHashes(); if (parents.length == 0 || parents.length == myHashToRecord.get(record.getHash()).size()) { ... | accept |
43,018 | void () { processCollectedRecords(); } | finish |
43,019 | void () { for (String hash : myHashToRecord.keySet()) { ArrayList<R> records = new ArrayList<>(Objects.requireNonNull(myHashToRecord.get(hash))); R firstRecord = records.get(0); if (firstRecord.getParentsHashes().length != 0 && records.size() != firstRecord.getParentsHashes().length) { processIncompleteRecord(hash, rec... | processCollectedRecords |
43,020 | void (@NotNull String hash, @NotNull List<R> records) { // there is a surprising (or not really surprising, depending how to look at it) problem with `-m` option // despite what is written in git-log documentation, it does not always output a record for each parent of a merge commit // if a merge commit has no changes ... | processIncompleteRecord |
43,021 | void (@NotNull List<R> records, @NotNull Map<String, String> hashToTreeMap) { R firstRecord = records.get(0); String commit = firstRecord.getHash(); String[] parents = firstRecord.getParentsHashes(); String commitTreeHash = hashToTreeMap.get(commit); LOG.assertTrue(commitTreeHash != null, "Could not get tree hash for c... | fillWithEmptyRecords |
43,022 | Collection<VcsRef> (@NotNull Collection<String> refs, @NotNull Hash hash, @NotNull VcsLogObjectsFactory factory, @NotNull VirtualFile root) { return ContainerUtil.mapNotNull(refs, refName -> { if (refName.equals(GRAFTED) || refName.equals(REPLACED)) return null; VcsRefType type = GitRefManager.getRefType(refName); refN... | parseRefs |
43,023 | VcsCommitMetadata (@NotNull VirtualFile root, @NotNull GitLogRecord record, @NotNull VcsLogObjectsFactory factory) { List<Hash> parents = ContainerUtil.map(record.getParentsHashes(), factory::createHash); return factory.createCommitMetadata(factory.createHash(record.getHash()), parents, record.getCommitTime(), root, re... | createMetadata |
43,024 | void (@NotNull Collection<String> hashes, @NotNull GitHandler handler) { handler.setInputProcessor(GitHandlerInputProcessorUtil.writeLines(hashes, "\n", handler.getCharset(), true)); } | sendHashesToStdin |
43,025 | String (@NotNull Project project) { return GitVersionSpecialty.NO_WALK_UNSORTED.existsIn(project) ? "--no-walk=unsorted" : "--no-walk"; } | getNoWalkParameter |
43,026 | GitLineHandler (@NotNull Project project, @NotNull VirtualFile root) { return createGitHandler(project, root, Collections.emptyList(), false); } | createGitHandler |
43,027 | GitLineHandler (@NotNull Project project, @NotNull VirtualFile root, @NotNull List<String> configParameters, boolean lowPriorityProcess) { GitLineHandler handler = new GitLineHandler(project, root, GitCommand.LOG, configParameters); if (lowPriorityProcess) handler.withLowPriority(); handler.setWithMediator(false); retu... | createGitHandler |
43,028 | long (@NotNull String timeString) { return Long.parseLong(timeString.trim()) * 1000; } | parseTime |
43,029 | String (@NotNull GitLogParser.GitLogOption key) { String value = myOptions.get(key); if (value == null) { LOG.error("Missing value for option " + key + ", while executing " + myHandler); return ""; } return value; } | lookup |
43,030 | Collection<String> () { final String decorate = myOptions.get(REF_NAMES); return parseRefNames(decorate); } | getRefs |
43,031 | boolean () { return mySupportsRawBody; } | isSupportsRawBody |
43,032 | List<String> (final @Nullable String decoration) { if (decoration == null) { return ContainerUtil.emptyList(); } final int startParentheses = decoration.indexOf("("); final int endParentheses = decoration.lastIndexOf(")"); if ((startParentheses == -1) || (endParentheses == -1)) return Collections.emptyList(); String re... | parseRefNames |
43,033 | void (GitHandler handler) { myHandler = handler; } | setUsedHandler |
43,034 | void (@NotNull AnActionEvent e, @NotNull Project project, @NotNull FilePath filePath, @NotNull VcsFileRevision previousRevision, @NotNull VcsFileRevision revision) { GitFileRevision rev = (GitFileRevision)revision; Collection<String> parents = rev.getParents(); if (parents.size() < 2) { super.showDiffForOne(e, project,... | showDiffForOne |
43,035 | String (@NotNull GitFileRevision revision) { return DvcsUtil.getShortHash(revision.getHash()); } | getPresentableName |
43,036 | void (final @NotNull AnActionEvent event, final @NotNull FilePath filePath, final @NotNull GitFileRevision rev, final @NotNull Collection<String> parents) { VcsHistorySession session = event.getData(VcsDataKeys.HISTORY_SESSION); List<VcsFileRevision> revisions = session != null ? session.getRevisionList() : null; check... | showDiffForMergeCommit |
43,037 | boolean () { return myWasFileTouched; } | wasFileTouched |
43,038 | Collection<GitFileRevision> () { return myParents; } | getParents |
43,039 | void (final @NotNull FilePath filePath, final @NotNull GitFileRevision rev, final @NotNull Collection<String> parentHashes, final @Nullable List<? extends VcsFileRevision> revisions, final @NotNull Consumer<? super MergeCommitPreCheckInfo> resultHandler) { Project project = myProject; new Task.Backgroundable(project, G... | checkIfFileWasTouchedAndFindParentsInBackground |
43,040 | void (@NotNull ProgressIndicator indicator) { try { VirtualFile root = GitUtil.getRootForFile(project, filePath); boolean fileTouched = wasFileTouched(project, root, rev); Collection<GitFileRevision> parents = findParentRevisions(root, rev, parentHashes, revisions); myInfo = new MergeCommitPreCheckInfo(fileTouched, par... | run |
43,041 | void () { if (myInfo != null) { // if info == null => an exception happened resultHandler.consume(myInfo); } } | onSuccess |
43,042 | void (@NotNull AnActionEvent event, @NotNull GitFileRevision rev, @NotNull FilePath filePath, @NotNull Collection<? extends GitFileRevision> parents) { ActionGroup parentActions = createActionGroup(rev, filePath, parents); DataContext dataContext = SimpleDataContext.getProjectContext(myProject); ListPopup popup = JBPop... | showPopup |
43,043 | void (@NotNull ListPopup popup, @NotNull AnActionEvent event, @NotNull DataContext dataContext) { if (event.getInputEvent() instanceof MouseEvent) { if (!event.getPlace().equals(ActionPlaces.UPDATE_POPUP)) { popup.show(new RelativePoint((MouseEvent)event.getInputEvent())); } else { // quick fix for invoking from the co... | showPopupInBestPosition |
43,044 | ActionGroup (@NotNull GitFileRevision rev, @NotNull FilePath filePath, @NotNull Collection<? extends GitFileRevision> parents) { Collection<AnAction> actions = new ArrayList<>(2); for (GitFileRevision parent : parents) { actions.add(createParentAction(rev, filePath, parent)); } return new DefaultActionGroup(actions.toA... | createActionGroup |
43,045 | AnAction (@NotNull GitFileRevision rev, @NotNull FilePath filePath, @NotNull GitFileRevision parent) { return new ShowDiffWithParentAction(filePath, rev, parent); } | createParentAction |
43,046 | GitFileRevision (@NotNull FilePath filePath, @NotNull String hash) { return new GitFileRevision(myProject, filePath, new GitRevisionNumber(hash)); } | makeRevisionFromHash |
43,047 | boolean (@NotNull VirtualFile root, @NotNull FilePath path, @NotNull List<String> output) { String relativePath = getRelativePath(root, path); if (relativePath == null) return false; for (String line : output) { if (line.startsWith("---") || line.startsWith("+++")) { if (line.contains(relativePath)) { return true; } } ... | isFilePresentInOutput |
43,048 | void (@NotNull AnActionEvent e) { doShowDiff(myFilePath, myParentRevision, myRevision); } | actionPerformed |
43,049 | String () { return myValue; } | getValue |
43,050 | String () { return myValue; } | toString |
43,051 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SHAHash shaHash = (SHAHash)o; if (!myValue.equals(shaHash.myValue)) return false; return true; } | equals |
43,052 | int () { return myValue.hashCode(); } | hashCode |
43,053 | void (@NotNull GitRepository repository, @NotNull Hash commit) { createNewTag(repository.getProject(), repository, commit.asString()); } | actionPerformed |
43,054 | void (@NotNull Project project, @NotNull GitRepository repository, @NotNull @NlsSafe String reference) { String name = Messages.showInputDialog(project, GitBundle.message("git.new.tag.dialog.tag.name.label"), GitBundle.message("git.new.tag.dialog.title", reference), Messages.getQuestionIcon(), "", new InputValidator() ... | createNewTag |
43,055 | boolean (String inputString) { return !StringUtil.isEmpty(inputString) && !StringUtil.containsWhitespaces(inputString); } | checkInput |
43,056 | boolean (String inputString) { return !StringUtil.isEmpty(inputString) && !StringUtil.containsWhitespaces(inputString); } | canClose |
43,057 | AbstractVcs (Project project) { return GitVcs.getInstance(project); } | getVcs |
43,058 | String (final Project project) { return GitVcs.NAME; } | getVcsName |
43,059 | void (@NotNull Project project, @NotNull List<VirtualFile> gitRoots, @NotNull VirtualFile defaultRoot) { DialogState dialogState = displayDialog(project, gitRoots, defaultRoot); if (dialogState == null) { return; } perform(dialogState, project); } | perform |
43,060 | void (@NotNull DialogState dialogState, @NotNull Project project) { VirtualFile selectedRoot = dialogState.selectedRoot; Supplier<GitLineHandler> handlerProvider = dialogState.handlerProvider; Label beforeLabel = LocalHistory.getInstance().putSystemLabel(project, GitBundle.message("merge.action.before.update.label")); ... | perform |
43,061 | void (@NotNull ProgressIndicator indicator) { GitRepositoryManager repositoryManager = GitUtil.getRepositoryManager(project); Git git = Git.getInstance(); GitLocalChangesWouldBeOverwrittenDetector localChangesDetector = new GitLocalChangesWouldBeOverwrittenDetector(selectedRoot, MERGE); GitUntrackedFilesOverwrittenByOp... | run |
43,062 | boolean (@NotNull Project project, VirtualFile selectedRoot) { return false; } | shouldSetupRebaseEditor |
43,063 | void (@NotNull GitCommandResult result, @NotNull Project project, @NotNull GitSimpleEventDetector mergeConflictDetector, @NotNull GitLocalChangesWouldBeOverwrittenDetector localChangesDetector, @NotNull GitUntrackedFilesOverwrittenByOperationDetector untrackedFilesDetector, @NotNull GitRepository repository, @NotNull G... | handleResult |
43,064 | void (@NotNull Project project, @NotNull GitRepository repository, @NotNull GitRevisionNumber currentRev, @NotNull Label beforeLabel, @NlsActions.ActionText @NotNull String actionName) { try { UpdatedFiles files = UpdatedFiles.create(); MergeChangeCollector collector = new MergeChangeCollector(project, repository, curr... | showUpdates |
43,065 | String () { return GitBundle.message("reset.action.name"); } | getActionName |
43,066 | void (@NotNull Project project, @NotNull List<VirtualFile> gitRoots, @NotNull VirtualFile defaultRoot) { GitResetDialog d = new GitResetDialog(project, gitRoots, defaultRoot); if (!d.showAndGet()) { return; } new Task.Backgroundable(project, GitBundle.message("resetting.title"), true) { @Override public void run(@NotNu... | perform |
43,067 | void (@NotNull ProgressIndicator indicator) { try (AccessToken ignored = DvcsUtil.workingTreeChangeStarted(project, getActionName())) { GitCommandResult result = Git.getInstance().runCommand(d.handler()); if (!result.success()) { VcsNotifier.getInstance(project).notifyError(RESET_FAILED, GitBundle.message("resetting.ti... | run |
43,068 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); Presentation presentation = e.getPresentation(); if (project == null || !hasGitRepositories(project) || !getRebasingRepositories(project).isEmpty()) { presentation.setEnabledAndVisible(false); } else if (getRepositoriesInState(project, Repository.State... | update |
43,069 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
43,070 | void (@NotNull AnActionEvent e) { final Project project = e.getRequiredData(CommonDataKeys.PROJECT); ArrayList<GitRepository> repositories = new ArrayList<>(getRepositories(project)); repositories.removeAll(getRebasingRepositories(project)); List<VirtualFile> roots = new ArrayList<>(getRootsFromRepositories(sortReposit... | actionPerformed |
43,071 | void (@NotNull ProgressIndicator indicator) { GitRepository selectedRepository = Objects.requireNonNull(GitRepositoryManager.getInstance(project).getRepositoryForRoot(root)); GitRebaseUtils.rebase(project, singletonList(selectedRepository), selectedParams, indicator); } | run |
43,072 | String () { return GitBundle.message("unstash.action.name"); } | getActionName |
43,073 | void (@NotNull AnActionEvent e) { AnAction showStashAction = ActionManager.getInstance().getAction("Git.Show.Stash"); AnActionEvent newEvent = AnActionEvent.createFromDataContext(e.getPlace(), showStashAction.getTemplatePresentation().clone(), e.getDataContext()); if (ActionUtil.lastUpdateAndCheckDumb(showStashAction, ... | actionPerformed |
43,074 | void (final @NotNull Project project, final @NotNull List<VirtualFile> gitRoots, final @NotNull VirtualFile defaultRoot) { final ChangeListManager changeListManager = ChangeListManager.getInstance(project); if (changeListManager.isFreezedWithNotification(GitBundle.message("unstash.error.can.not.unstash.changes.now"))) ... | perform |
43,075 | void (@NotNull Project project, @NotNull ProgressIndicator indicator) { GitRebaseUtils.skipRebase(project); } | performActionForProject |
43,076 | void (@NotNull Project project, @NotNull GitRepository repository, @NotNull ProgressIndicator indicator) { GitRebaseUtils.skipRebase(project, repository, indicator); } | performActionForRepository |
43,077 | AnAction (final @NotNull FileAnnotation annotation) { return new MyGroup(annotation); } | createAction |
43,078 | void (@NotNull Project project, boolean clearCaches) { if (clearCaches) { ProjectLevelVcsManager.getInstance(project).getVcsHistoryCache().clearAnnotations(); } ProjectLevelVcsManager.getInstance(project).getAnnotationLocalChangesListener().reloadAnnotationsForVcs(GitVcs.getKey()); } | resetAllAnnotations |
43,079 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
43,080 | boolean (@NotNull AnActionEvent e) { return mySettings != null && Boolean.TRUE.equals(mySettings.get(CommonUiProperties.PREFER_COMMIT_DATE)); } | isSelected |
43,081 | void (@NotNull AnActionEvent e, boolean state) { if (mySettings != null) { mySettings.set(CommonUiProperties.PREFER_COMMIT_DATE, state); } } | setSelected |
43,082 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
43,083 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
43,084 | boolean (@NotNull AnActionEvent e) { return GitVcsApplicationSettings.getInstance().isIgnoreWhitespaces(); } | isSelected |
43,085 | void (@NotNull AnActionEvent e, boolean enabled) { GitVcsApplicationSettings.getInstance().setIgnoreWhitespaces(enabled); resetAllAnnotations(myProject, true); } | setSelected |
43,086 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
43,087 | boolean (@NotNull AnActionEvent e) { AnnotateDetectMovementsOption movementsOption = GitVcsApplicationSettings.getInstance().getAnnotateDetectMovementsOption(); return movementsOption == AnnotateDetectMovementsOption.INNER || movementsOption == AnnotateDetectMovementsOption.OUTER; } | isSelected |
43,088 | void (@NotNull AnActionEvent e, boolean enabled) { GitVcsApplicationSettings.getInstance() .setAnnotateDetectMovementsOption(enabled ? AnnotateDetectMovementsOption.INNER : AnnotateDetectMovementsOption.NONE); resetAllAnnotations(myProject, true); } | setSelected |
43,089 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
43,090 | boolean (@NotNull AnActionEvent e) { return GitVcsApplicationSettings.getInstance() .getAnnotateDetectMovementsOption() == AnnotateDetectMovementsOption.OUTER; } | isSelected |
43,091 | void (@NotNull AnActionEvent e, boolean enabled) { GitVcsApplicationSettings.getInstance() .setAnnotateDetectMovementsOption(enabled ? AnnotateDetectMovementsOption.OUTER : AnnotateDetectMovementsOption.INNER); resetAllAnnotations(myProject, true); } | setSelected |
43,092 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); e.getPresentation().setEnabledAndVisible(project == null || project.isDefault() || TrustedProjects.isTrusted(project)); } | update |
43,093 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
43,094 | void (@NotNull AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); if (project == null) { project = ProjectManager.getInstance().getDefaultProject(); } FileChooserDescriptor fcd = FileChooserDescriptorFactory.createSingleFolderDescriptor(); fcd.setShowFileSystemRoots(true); fcd.setTitle(GitBundle.me... | actionPerformed |
43,095 | void (@NotNull Project project, @NotNull FileChooserDescriptor fcd, VirtualFile baseDir) { FileChooser.chooseFile(fcd, project, baseDir, root -> { if (GitUtil.isUnderGit(root) && Messages.showYesNoDialog(project, XmlStringUtil.wrapInHtml( GitBundle.message("init.warning.already.under.git", StringUtil.escapeXmlEntities(... | doInit |
43,096 | void (@NotNull ProgressIndicator indicator) { GitCommandResult result = Git.getInstance().init(project, root); if (!result.success()) { VcsNotifier.getInstance(project).notifyError(INIT_FAILED, GitBundle.message("action.Git.Init.error"), result.getErrorOutputAsHtmlString(), true); return; } if (project.isDefault()) { r... | run |
43,097 | void (@NotNull Project project, @NotNull VirtualFile root, @NotNull String path) { GitUtil.refreshVfsInRoot(root); ProjectLevelVcsManager manager = ProjectLevelVcsManager.getInstance(project); manager.setDirectoryMappings(VcsUtil.addMapping(manager.getDirectoryMappings(), path, GitVcs.NAME)); VcsDirtyScopeManager.getIn... | refreshAndConfigureVcsMappings |
43,098 | void (@NotNull Project project, @NotNull VirtualFile root) { ProjectLevelVcsManager manager = ProjectLevelVcsManager.getInstance(project); manager.setDirectoryMappings(VcsUtil.addMapping(manager.getDirectoryMappings(), root.getPath(), GitVcs.NAME)); } | configureVcsMappings |
43,099 | void (@NotNull Project project, @NotNull ProgressIndicator indicator) { GitRebaseUtils.abort(project, indicator); } | performActionForProject |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.