From a1be517ee0689972e28e72d845f21e3829fddeb2 Mon Sep 17 00:00:00 2001 From: Constantine Plotnikov Date: Tue, 27 Oct 2009 17:19:14 +0300 Subject: [PATCH] git4idea: Date and time are now added in the stash message --- plugins/git4idea/src/git4idea/update/GitUpdateEnvironment.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/git4idea/src/git4idea/update/GitUpdateEnvironment.java b/plugins/git4idea/src/git4idea/update/GitUpdateEnvironment.java index cc35099832..221e57f071 100644 --- a/plugins/git4idea/src/git4idea/update/GitUpdateEnvironment.java +++ b/plugins/git4idea/src/git4idea/update/GitUpdateEnvironment.java @@ -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 cancelled = new Ref(false); final Ref ex = new Ref(); 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"); -- 2.11.4.GIT