diff options
author | Stefan Lay <stefan.lay@sap.com> | 2014-03-27 16:18:42 +0100 |
---|---|---|
committer | Robin Rosenberg <robin.rosenberg@dewire.com> | 2014-03-27 16:11:15 -0400 |
commit | e56d50a94bfe60663bd589da61e07b9461f2c5f7 (patch) | |
tree | c7fd37a792ee947cefa5288ef79cb7c8c164f2cc /org.eclipse.jgit | |
parent | 6995069464b994057b47581092b2db4f20126c08 (diff) | |
download | jgit-e56d50a94bfe60663bd589da61e07b9461f2c5f7.tar.gz jgit-e56d50a94bfe60663bd589da61e07b9461f2c5f7.zip |
Interactive rebase: Fix order of commit messages on squash
Bug: 431214
Change-Id: I295bfdc5751545b046d7fe7efc3f8b39ab4f5415
Signed-off-by: Stefan Lay <stefan.lay@sap.com>
Signed-off-by: Robin Rosennberg <robin.rosenberg@dewire.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java index 330902c843..3b84917421 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java @@ -621,6 +621,9 @@ public class RebaseCommand extends GitCommand<RebaseResult> { sb.setLength(0); sb.append("# This is a combination of ").append(count) .append(" commits.\n"); + // Add the previous message without header (i.e first line) + sb.append(currSquashMessage.substring(currSquashMessage.indexOf("\n") + 1)); + sb.append("\n"); if (isSquash) { sb.append("# This is the ").append(count).append(ordinal) .append(" commit message:\n"); @@ -631,9 +634,6 @@ public class RebaseCommand extends GitCommand<RebaseResult> { sb.append(commitToPick.getFullMessage().replaceAll("([\n\r])", "$1# ")); } - // Add the previous message without header (i.e first line) - sb.append("\n"); - sb.append(currSquashMessage.substring(currSquashMessage.indexOf("\n") + 1)); return sb.toString(); } |