[git] cherry-pick: use single \n between description and "cherry-picked from...", since Git itself does so.

This commit is contained in:
Kirill Likhodedov
2013-01-02 17:23:22 +04:00
parent 109f50685b
commit 1bfa01e0f0
@@ -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,