aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkShallowTest.java
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Return parsed objects from TestRepository.commit/tree/blob()Terry Parker2018-06-281-98/+99
| | | | | | | | | | | | | It is convenient for TestRepository to return fully parsed objects from its commit()/tree()/blob() methods, so that test code doesn't have to remember to parse them before making assertions about them. Update TestRepostiory to return fully parsed objects. Adjust the tests that are affected by this change in behavior. Change-Id: I09d03d0c80ad22cb7092f4a2eaed99d40a10af63 Signed-off-by: Terry Parker <tparker@google.com>
* Correctly handle initialization of shallow commitsTerry Parker2018-06-261-0/+16
| | | | | | | | | | | | | | | | | | | | | In a new RevWalk, if the first object parsed is one of the shallow commits, the following happens: 1) RevCommit.parseCanonical() is called on a new "r1" RevCommit. 2) RevCommit.parseCanonical() immediately calls RevWalk.initializeShallowCommits(). 3) RevWalk.initializeShallowCommits() calls lookupCommit(id), creating and adding a new "r2" version of this same object and marking its parents empty. 4) RevCommit.parseCanonical() initializes the "r1" RevCommit's fields, including the parents. 5) RevCommit.parseCanonical()'s caller uses the "r1" commit that has parents, losing the fact that it is a shallow commit. This change passes the current RevCommit as an argument to RevWalk.initializeShallowCommits() so that method can set its parents empty rather than creating the duplicate "r2" commit. Change-Id: I67b79aa2927dd71ac7b0d8f8917f423dcaf08c8a Signed-off-by: Terry Parker <tparker@google.com>
* Expand wildcard imports to specfic classesShawn Pearce2014-11-101-4/+4
| | | | | | | | | JGit style is to import exactly the classes required, and never to use "import foo.*" as the foo package could add new classes in the future which are conflicting/confusing with the imports already used by a source file. Change-Id: I5693408c777e5843ec65fff1163d5d717849fa34
* Remove unused repository field from RevWalkDave Borowitz2013-05-051-1/+1
| | | | | | | | The comment about legacy Tag and Object types no longer applies, though prior to Idb273d5a92849b42935ac14eed73b796b80aad50 the field was still being used by RewriteTreeFilter. Change-Id: I9ee5da8f8a3b61c9cf543817c03117ee0609dd8f
* RevWalk support for shallow clonesMarc Strapetz2012-11-211-0/+195
StartGenerator now processes .git/shallow to have the RevWalk stop for shallow commits. See RevWalkShallowTest for tests. Bug: 394543 CQ: 6908 Change-Id: Ia5af1dab3fe9c7888f44eeecab1e1bcf2e8e48fe Signed-off-by: Chris Aniszczyk <zx@twitter.com>