From 1bfa01e0f00acd684f059cef6dd139db14dd99cb Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Sat, 15 Dec 2012 18:18:11 +0400 Subject: [PATCH] [git] cherry-pick: use single \n between description and "cherry-picked from...", since Git itself does so. --- .../git4idea/history/browser/GitCherryPicker.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/plugins/git4idea/src/git4idea/history/browser/GitCherryPicker.java b/plugins/git4idea/src/git4idea/history/browser/GitCherryPicker.java index 56bcac419f54..bfb09a6f76c7 100644 --- a/plugins/git4idea/src/git4idea/history/browser/GitCherryPicker.java +++ b/plugins/git4idea/src/git4idea/history/browser/GitCherryPicker.java @@ -226,18 +226,7 @@ public class GitCherryPicker { @NotNull private static String createCommitMessage(@NotNull GitCommit commit) { - // make sure there is an empty line after description - String spaces; - if (commit.getDescription().endsWith("\n\n")) { - spaces = ""; - } - else if (commit.getDescription().endsWith("\n")) { - spaces = "\n"; - } - else { - spaces = "\n\n"; - } - return commit.getDescription() + spaces + "(cherry-picked from " + commit.getShortHash().getString() + ")"; + return commit.getDescription() + "\n(cherry-picked from " + commit.getShortHash().getString() + ")"; } private boolean showCommitDialogAndWaitForCommit(@NotNull final GitRepository repository, @NotNull final GitCommitWrapper commit,