mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
git4idea: Date and time are now added in the stash message
This commit is contained in:
@@ -53,6 +53,7 @@ import git4idea.ui.GitUIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
@@ -153,6 +154,8 @@ public class GitUpdateEnvironment implements UpdateEnvironment {
|
||||
});
|
||||
return new GitUpdateSession(exceptions);
|
||||
}
|
||||
String stashMessage = "Uncommitted changes before update operation at " +
|
||||
DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, Locale.US).format(new Date());
|
||||
for (final VirtualFile root : roots) {
|
||||
try {
|
||||
// check if there is a remote for the branch
|
||||
@@ -167,8 +170,7 @@ public class GitUpdateEnvironment implements UpdateEnvironment {
|
||||
final Ref<Boolean> cancelled = new Ref<Boolean>(false);
|
||||
final Ref<Throwable> ex = new Ref<Throwable>();
|
||||
try {
|
||||
boolean stashCreated =
|
||||
rootsToStash.contains(root) && GitStashUtils.saveStash(myProject, root, "Uncommitted changes before update operation");
|
||||
boolean stashCreated = rootsToStash.contains(root) && GitStashUtils.saveStash(myProject, root, stashMessage);
|
||||
try {
|
||||
// remember the current position
|
||||
GitRevisionNumber before = GitRevisionNumber.resolve(myProject, root, "HEAD");
|
||||
|
||||
Reference in New Issue
Block a user