aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RevertCommandTest.java
Commit message (Collapse)AuthorAgeFilesLines
* RefDatabase#getReflogReader(String): use #exactRef to resolve refNameMatthias Sohn2025-01-271-4/+4
| | | | | | Don't accept short ref names anymore which is more predictable. Change-Id: I5e7323c610c68b25facd6f2286456716d8e6cf1a
* Deprecate Repository#getReflogReader methodsMatthias Sohn2025-01-271-12/+17
| | | | | | instead use Repository.getRefDatabase().getReflogReader(). Change-Id: I5e66a512c12e11d0ec3275fffde4adb8483430f2
* RevertCommand: use only first line in revert commit messageThomas Wolf2024-12-111-3/+6
| | | | | | | | | | | | | | | C git uses only the first line of the title paragraph of the reverted commit to build the title of the revert commit. Align the JGit behavior with that. Since git 2.43.0, a revert of a revert uses a title "Reapply "xxx"" instead of "Revert "Revert "xxx""".[1] This is _not_ implemented in this change. [1] https://github.com/git/git/commit/883cb1b8f86d Bug: jgit-117 Change-Id: I030092c6b9447bb738e6d761af5ce50df58cc6d3
* RevertCommand: support for inserting a Gerrit change IDThomas Wolf2023-09-081-0/+37
| | | | | | | Add a setter for the flag to be passed through to the CommitCommand. Bug: 342790 Change-Id: I87548d7c2742af8af5ef6105115e3ab9c58d1d9f Signed-off-by: Thomas Wolf <twolf@apache.org>
* Introduce a constant for the length of an abbreviated hash stringSebastian Schuberth2022-02-031-1/+4
| | | | | Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io> Change-Id: I196d58a813f7caa1965af4cf8e2f977ed4cdc350
* Merge conflict messages: prefix conflict lines with a hashThomas Wolf2022-01-311-1/+1
| | | | | | | | C git also does so. Note that currently the comment character is hard-coded as the hash '#' throughout JGit. Bug: 548529 Change-Id: I4a5597694082a9e5b07412b365cfaf41fa034cfa Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Fix typo in test method nameThomas Wolf2021-04-091-1/+1
| | | | Change-Id: I34718829435daf8ded4ce596c824dd3cfbafbaf6 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Update EDL 1.0 license headers to new short SPDX compliant formatMatthias Sohn2020-01-041-38/+5
| | | | | | | | | | This is the format given by the Eclipse legal doc generator [1]. [1] https://www.eclipse.org/projects/tools/documentation.php?id=technology.jgit Bug: 548298 Change-Id: I8d8cabc998ba1b083e3f0906a8d558d391ffb6c4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove 'final' in parameter listsHan-Wen Nienhuys2018-05-151-1/+1
| | | | | Change-Id: Id924f79c8b2c720297ebc49bf9c5d4ddd6d52547 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
* RevertCommandTest: Open Git in try-with-resourceDavid Pursehouse2016-02-051-237/+243
| | | | | Change-Id: I659adbb0a6f741c4c6f615c8a24b4603c3f6681e Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
* Fix RevertCommand to correctly revert multiple commits at once.Maik Schreiber2014-07-301-0/+100
| | | | | | | | 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>
* Make the Reflog a public API againRobin Rosenberg2013-04-261-1/+1
| | | | Change-Id: I8ced7098da5b345fd9af2fdfafd1ef6a44ccee0d
* JGit 3.0: move internal classes into an internal subpackageShawn Pearce2013-03-181-1/+1
| | | | | | | | This breaks all existing callers once. Applications are not supposed to build against the internal storage API unless they can accept API churn and make necessary updates as versions change. Change-Id: I2ab1327c202ef2003565e1b0770a583970e432e9
* Move base test classes to the junit bundle for reuse for Java 7 testsRobin Rosenberg2013-02-041-3/+7
| | | | Change-Id: Iedb54eb9d8396bc3ae66d8754c1527fd9ca655f9
* Update the revert command and things relating to revertRobin Rosenberg2012-12-281-0/+208
| | | | | | | | | | | | | | | | | Cherry-pick has been fixed, but even though revert does basically the same thing, the fixes were not carried over here. - Recognize the revert-states, analogous to the cherry picking states - Make reset handle a revert-in-progress - Update REVERT_HEAD and MERGE_MSG when revert fails due to conflicts - Clear revert state on commit and reset - Format the message similarily to how cherry-pick does. This is not exactly how C Git does it. The interface is still not the same as for cherry-picking. Change-Id: I8ea956fcbc9526d62a2365360feea23a9280eba3 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Test the reflog message for commit, cherry-pick, revert and mergeRobin Rosenberg2011-09-211-0/+10
| | | | | | Change-Id: I319f09577b3e04f6c31399fe8e57e9a9ad2c8a6c Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* RevertCommand: Add "." after reverted commit idRobin Stocker2011-05-131-2/+5
| | | | | | | | | This makes the message look the same as in C Git (the "."): This reverts commit <sha1>. Change-Id: I4c254c122277b127e7b039c0d1c7f7a0d691530d Signed-off-by: Robin Stocker <robin@nibor.org>
* Implement a revert commandRobin Rosenberg2011-01-021-0/+101
This is almost reverted cherry-pick, and the implementation is almost identical. It orders the input to merge differently to get the effect and produces a different commit message with the default author, rather than the original author. Change-Id: I39970091d9f7406ae7168b8efaab23a5e2c16bad Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>