From 8ba05c3c539a609154582ad4f2d168ecd82453ff Mon Sep 17 00:00:00 2001 From: UNV Date: Tue, 11 Nov 2025 01:11:34 +0300 Subject: [PATCH] Fixing typos. --- plugin/src/main/java/git4idea/GitUtil.java | 8 ++++---- .../java/git4idea/changes/GitChangeUtils.java | 15 ++++++++------- .../git4idea/history/browser/GitHeavyCommit.java | 11 ++++++----- plugin/src/main/java/git4idea/i18n/GitBundle.java | 14 ++------------ .../push/GitRejectedPushUpdateDialog.java | 7 ++++--- .../java/git4idea/update/GitUpdateProcess.java | 8 ++++---- plugin/src/main/java/git4idea/util/GitUIUtil.java | 6 +++--- 7 files changed, 31 insertions(+), 38 deletions(-) diff --git a/plugin/src/main/java/git4idea/GitUtil.java b/plugin/src/main/java/git4idea/GitUtil.java index fa48cd7..18ef970 100644 --- a/plugin/src/main/java/git4idea/GitUtil.java +++ b/plugin/src/main/java/git4idea/GitUtil.java @@ -865,14 +865,14 @@ public static String getPrintableRemotes(@Nonnull Collection remotes) * @param file the file affected by the revision * @param local pass true to let the diff be editable, i.e. making the revision "at the right" be a local (current) revision. * pass false to let both sides of the diff be non-editable. - * @param revertable pass true to let "Revert" action be active. + * @param revertible pass true to let "Revert" action be active. */ public static void showSubmittedFiles( final Project project, final String revision, final VirtualFile file, final boolean local, - final boolean revertable + final boolean revertible ) { new Task.Backgroundable(project, GitLocalize.changesRetrieving(revision)) { @Override @@ -881,7 +881,7 @@ public void run(@Nonnull ProgressIndicator indicator) { try { VirtualFile vcsRoot = getGitRoot(file); final CommittedChangeList changeList = - GitChangeUtils.getRevisionChanges(project, vcsRoot, revision, true, local, revertable); + GitChangeUtils.getRevisionChanges(project, vcsRoot, revision, true, local, revertible); if (changeList != null) { UIUtil.invokeLaterIfNeeded( () -> AbstractVcsHelper.getInstance(project) @@ -936,7 +936,7 @@ public static Map> sortFilesByGitRootsIgnoringOth * @param staged if true checks the staging area, if false checks unstaged files. * @param project * @param root - * @return true if there is anything in the unstaged/staging area, false if the unstraed/staging area is empty. + * @return true if there is anything in the unstaged/staging area, false if the unstaged/staging area is empty. */ public static boolean hasLocalChanges(boolean staged, Project project, VirtualFile root) throws VcsException { final GitSimpleHandler diff = new GitSimpleHandler(project, root, GitCommand.DIFF); diff --git a/plugin/src/main/java/git4idea/changes/GitChangeUtils.java b/plugin/src/main/java/git4idea/changes/GitChangeUtils.java index 05c5613..42c2f90 100644 --- a/plugin/src/main/java/git4idea/changes/GitChangeUtils.java +++ b/plugin/src/main/java/git4idea/changes/GitChangeUtils.java @@ -24,6 +24,7 @@ import consulo.versionControlSystem.VcsException; import consulo.versionControlSystem.change.Change; import consulo.versionControlSystem.change.ContentRevision; +import consulo.versionControlSystem.change.CurrentContentRevision; import consulo.virtualFileSystem.VirtualFile; import consulo.virtualFileSystem.status.FileStatus; import git4idea.GitContentRevision; @@ -262,18 +263,18 @@ public static boolean isHeadMissing(final VcsException e) * @param revisionName the name of revision (might be tag) * @param skipDiffsForMerge * @param local - * @param revertable + * @param revertible * @return change list for the respective revision * @throws VcsException in case of problem with running git */ - public static GitCommittedChangeList getRevisionChanges(Project project, VirtualFile root, String revisionName, boolean skipDiffsForMerge, boolean local, boolean revertable) throws VcsException + public static GitCommittedChangeList getRevisionChanges(Project project, VirtualFile root, String revisionName, boolean skipDiffsForMerge, boolean local, boolean revertible) throws VcsException { GitSimpleHandler h = new GitSimpleHandler(project, root, GitCommand.SHOW); h.setSilent(true); h.addParameters("--name-status", "--first-parent", "--no-abbrev", "-M", "--pretty=format:" + COMMITTED_CHANGELIST_FORMAT, "--encoding=UTF-8", revisionName, "--"); String output = h.run(); StringScanner s = new StringScanner(output); - return parseChangeList(project, root, s, skipDiffsForMerge, h, local, revertable); + return parseChangeList(project, root, s, skipDiffsForMerge, h, local, revertible); } @Nullable @@ -311,9 +312,9 @@ public static SHAHash commitExists(final Project project, final VirtualFile root * @param skipDiffsForMerge * @param handler the handler that produced the output to parse. - for debugging purposes. * @param local pass {@code true} to indicate that this revision should be an editable - * {@link consulo.versionControlSystem.change.CurrentContentRevision}. + * {@link CurrentContentRevision}. * Pass {@code false} for - * @param revertable + * @param revertible * @return the parsed changelist * @throws VcsException if there is a problem with running git */ @@ -323,7 +324,7 @@ public static GitCommittedChangeList parseChangeList(Project project, boolean skipDiffsForMerge, GitHandler handler, boolean local, - boolean revertable) throws VcsException + boolean revertible) throws VcsException { ArrayList changes = new ArrayList<>(); // parse commit information @@ -382,7 +383,7 @@ else if(commentBody.length() == 0) } } String changeListName = String.format("%s(%s)", commentSubject, revisionNumber); - return new GitCommittedChangeList(changeListName, fullComment, committerName, thisRevision, commitDate, changes, assertNotNull(GitVcs.getInstance(project)), revertable); + return new GitCommittedChangeList(changeListName, fullComment, committerName, thisRevision, commitDate, changes, assertNotNull(GitVcs.getInstance(project)), revertible); } public static long longForSHAHash(String revisionNumber) diff --git a/plugin/src/main/java/git4idea/history/browser/GitHeavyCommit.java b/plugin/src/main/java/git4idea/history/browser/GitHeavyCommit.java index 076e5ae..19f92f1 100644 --- a/plugin/src/main/java/git4idea/history/browser/GitHeavyCommit.java +++ b/plugin/src/main/java/git4idea/history/browser/GitHeavyCommit.java @@ -46,7 +46,7 @@ public class GitHeavyCommit { private final Date myDate; private final String myAuthorEmail; - private final String myComitterEmail; + private final String myCommitterEmail; private final List myTags; private final List myLocalBranches; @@ -76,7 +76,7 @@ public GitHeavyCommit(@Nonnull VirtualFile root, @Nonnull final AbstractHash sho final Set parentsHashes, final List pathsList, final String authorEmail, - final String comitterEmail, + final String committerEmail, List tags, final List localBranches, final List remoteBranches, @@ -93,7 +93,7 @@ public GitHeavyCommit(@Nonnull VirtualFile root, @Nonnull final AbstractHash sho myParentsHashes = parentsHashes; myPathsList = pathsList; myAuthorEmail = authorEmail; - myComitterEmail = comitterEmail; + myCommitterEmail = committerEmail; myTags = tags; myChanges = changes; myLocalBranches = localBranches; @@ -176,7 +176,7 @@ public String getAuthorEmail() { } public String getCommitterEmail() { - return myComitterEmail; + return myCommitterEmail; } public List getPathsList() { @@ -209,8 +209,9 @@ public long getAuthorTime() { return myAuthorTime; } + @Deprecated(forRemoval = true) public String getComitterEmail() { - return myComitterEmail; + return getCommitterEmail(); } public boolean isOnLocal() { diff --git a/plugin/src/main/java/git4idea/i18n/GitBundle.java b/plugin/src/main/java/git4idea/i18n/GitBundle.java index 20516c2..68f0fb6 100644 --- a/plugin/src/main/java/git4idea/i18n/GitBundle.java +++ b/plugin/src/main/java/git4idea/i18n/GitBundle.java @@ -14,18 +14,6 @@ * limitations under the License. */ package git4idea.i18n; -/* - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for - * the specific language governing permissions and limitations under the License. - * - * Author: Anatol Pomazu - */ import consulo.annotation.DeprecationInfo; import consulo.annotation.internal.MigratedExtensionsTo; @@ -35,6 +23,8 @@ /** * Git4Idea package I18N localization bundle helper + * + * @author Anatol Pomazu */ @Deprecated(forRemoval = true) @DeprecationInfo("Use GitLocalize") diff --git a/plugin/src/main/java/git4idea/push/GitRejectedPushUpdateDialog.java b/plugin/src/main/java/git4idea/push/GitRejectedPushUpdateDialog.java index a63b3ed..4e317bb 100644 --- a/plugin/src/main/java/git4idea/push/GitRejectedPushUpdateDialog.java +++ b/plugin/src/main/java/git4idea/push/GitRejectedPushUpdateDialog.java @@ -47,7 +47,7 @@ class GitRejectedPushUpdateDialog extends DialogWrapper { static final int MERGE_EXIT_CODE = NEXT_USER_EXIT_CODE; static final int REBASE_EXIT_CODE = MERGE_EXIT_CODE + 1; - private static final String HTML_IDENT = "    "; + private static final String HTML_INDENT = "    "; public static final String DESCRIPTION_START = "Push of current branch "; private final Project myProject; @@ -148,7 +148,7 @@ else if (myRepositories.size() == 1) { // there are more than 1 repositories in String branchName = currentBranches.values().iterator().next().getName(); StringBuilder sb = new StringBuilder(DESCRIPTION_START + code(branchName) + " was rejected in repositories
"); for (GitRepository repository : DvcsUtil.sortRepositories(currentBranches.keySet())) { - sb.append(HTML_IDENT).append(code(repository.getPresentableUrl())).append("
"); + sb.append(HTML_INDENT).append(code(repository.getPresentableUrl())).append("
"); } sb.append(descriptionEnding()); return sb.toString(); @@ -158,7 +158,8 @@ else if (myRepositories.size() == 1) { // there are more than 1 repositories in for (Map.Entry entry : currentBranches.entrySet()) { GitRepository repository = entry.getKey(); GitBranch currentBranch = entry.getValue(); - sb.append(HTML_IDENT + code(currentBranch.getName()) + " in " + code(repository.getPresentableUrl()) + "
"); + sb.append(HTML_INDENT).append(code(currentBranch.getName())) + .append(" in ").append(code(repository.getPresentableUrl())).append("
"); } sb.append(descriptionEnding()); return sb.toString(); diff --git a/plugin/src/main/java/git4idea/update/GitUpdateProcess.java b/plugin/src/main/java/git4idea/update/GitUpdateProcess.java index a34feb7..4ca33c3 100644 --- a/plugin/src/main/java/git4idea/update/GitUpdateProcess.java +++ b/plugin/src/main/java/git4idea/update/GitUpdateProcess.java @@ -79,7 +79,7 @@ public class GitUpdateProcess { @Nonnull private final List myRepositories; private final boolean myCheckRebaseOverMergeProblem; - private final boolean myCheckForTrackedBranchExistance; + private final boolean myCheckForTrackedBranchExistence; private final UpdatedFiles myUpdatedFiles; @Nonnull private final ProgressIndicator myProgressIndicator; @@ -91,10 +91,10 @@ public GitUpdateProcess(@Nonnull Project project, @Nonnull Collection repositories, @Nonnull UpdatedFiles updatedFiles, boolean checkRebaseOverMergeProblem, - boolean checkForTrackedBranchExistance) { + boolean checkForTrackedBranchExistence) { myProject = project; myCheckRebaseOverMergeProblem = checkRebaseOverMergeProblem; - myCheckForTrackedBranchExistance = checkForTrackedBranchExistance; + myCheckForTrackedBranchExistence = checkForTrackedBranchExistence; myGit = Git.getInstance(); myChangeListManager = ChangeListManager.getInstance(project); myVcsManager = ProjectLevelVcsManager.getInstance(project); @@ -352,7 +352,7 @@ private Map checkTrackedBranchesConfiguration() { GitBranchTrackInfo trackInfo = GitBranchUtil.getTrackInfoForBranch(repository, branch); if (trackInfo == null) { LOG.info(String.format("checkTrackedBranchesConfigured: no track info for current branch %s in %s", branch, repository)); - if (myCheckForTrackedBranchExistance) { + if (myCheckForTrackedBranchExistence) { notifyImportantError(repository.getProject(), "Can't Update", getNoTrackedBranchError(repository, branch.getName())); return null; } diff --git a/plugin/src/main/java/git4idea/util/GitUIUtil.java b/plugin/src/main/java/git4idea/util/GitUIUtil.java index 7b372df..09c90f6 100644 --- a/plugin/src/main/java/git4idea/util/GitUIUtil.java +++ b/plugin/src/main/java/git4idea/util/GitUIUtil.java @@ -63,12 +63,12 @@ public static void notifyMessages( if (messages != null && !messages.isEmpty()) { desc += StringUtil.join(messages, "

"); } - VcsNotifier notificator = VcsNotifier.getInstance(project); + VcsNotifier notifier = VcsNotifier.getInstance(project); if (important) { - notificator.notifyError(title, desc); + notifier.notifyError(title, desc); } else { - notificator.notifyImportantWarning(title, desc, null); + notifier.notifyImportantWarning(title, desc, null); } }