diff --git a/plugins/git4idea/src/git4idea/branch/GitDeleteTagOperation.java b/plugins/git4idea/src/git4idea/branch/GitDeleteTagOperation.java
index 7d2eb632e817..4202a6eb7aa0 100644
--- a/plugins/git4idea/src/git4idea/branch/GitDeleteTagOperation.java
+++ b/plugins/git4idea/src/git4idea/branch/GitDeleteTagOperation.java
@@ -81,22 +81,6 @@ class GitDeleteTagOperation extends GitBranchOperation {
myNotifier.notify(notification);
}
- @NotNull
- private GitCompoundResult doRollback() {
- GitCompoundResult result = new GitCompoundResult(myProject);
- for (GitRepository repository : getSuccessfulRepositories()) {
- GitCommandResult res = myGit.createNewTag(repository, myTagName, null, myDeletedTagTips.get(repository));
- result.append(repository, res);
- repository.getRepositoryFiles().refresh();
- }
- return result;
- }
-
- @NotNull
- private static String formatTagName(@NotNull String name) {
- return "" + name + "";
- }
-
private void restoreInBackground(@NotNull Notification notification) {
new Task.Backgroundable(myProject, "Restoring Tag " + myTagName + "...") {
@Override
@@ -107,12 +91,18 @@ class GitDeleteTagOperation extends GitBranchOperation {
}
private void rollbackTagDeletion(@NotNull Notification notification) {
- GitCompoundResult result = doRollback();
+ GitCompoundResult result = new GitCompoundResult(myProject);
+ for (GitRepository repository: getSuccessfulRepositories()) {
+ GitCommandResult res = myGit.createNewTag(repository, myTagName, null, myDeletedTagTips.get(repository));
+ result.append(repository, res);
+ repository.getRepositoryFiles().refresh();
+ }
+
if (result.totalSuccess()) {
notification.expire();
}
else {
- myNotifier.notifyError("Couldn't Restore " + formatTagName(myTagName), result.getErrorOutputWithReposIndication());
+ myNotifier.notifyError("Couldn't Restore " + myTagName + "", result.getErrorOutputWithReposIndication());
}
}