diff options
author | Maik Schreiber <blizzy@blizzy.de> | 2014-06-19 12:54:14 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2014-07-30 16:20:08 +0200 |
commit | 7ff1e0d8f56dda85ba2a2224126a1075bda1bcf2 (patch) | |
tree | 53d7f37d3a5ba52402cc5213aa661d0a5e438d09 /org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java | |
parent | 7b0ee393ba1b5b99aa89c92bb841ef057c2aaa02 (diff) | |
download | jgit-7ff1e0d8f56dda85ba2a2224126a1075bda1bcf2.tar.gz jgit-7ff1e0d8f56dda85ba2a2224126a1075bda1bcf2.zip |
Fix RevertCommand to correctly revert multiple commits at once.
The fix is to move the new head commit to the newly-created revert
commit, so that additional revert commits will use the correct head.
Change-Id: I5de3a9a2a4c276e60af732e9c507cbbdfd1a4652
Signed-off-by: Maik Schreiber <blizzy@blizzy.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java index 52327d76c7..470d823aca 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java @@ -186,6 +186,7 @@ public class RevertCommand extends GitCommand<RevCommit> { .setMessage(newMessage) .setReflogComment("revert: " + shortMessage).call(); //$NON-NLS-1$ revertedRefs.add(src); + headCommit = newHead; } else { unmergedPaths = merger.getUnmergedPaths(); Map<String, MergeFailureReason> failingPaths = merger |