| Modifier and Type | Class and Description |
|---|---|
| public class | TestRepository.
Helper to build a branch with one or more commits |
| public class | TestRepository.
Helper to generate a commit. |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | AUTHOR
Constant |
| public static final String | AUTHOR_EMAIL
Constant |
| public static final String | COMMITTER
Constant |
| public static final String | COMMITTER_EMAIL
Constant |
| private final R | |
| private final PersonIdent | |
| private final PersonIdent | |
| private final Git | |
| private final ObjectInserter | |
| private final MockSystemReader | |
| private final RevWalk |
| Access | Constructor and Description |
|---|---|
| public | |
| public | TestRepository(R
the test repository to write into. db, RevWalk the RevObject pool to use for object lookup. rw)Wrap a repository with test building tools. |
| public | TestRepository(R
the test repository to write into. db, RevWalk the RevObject pool to use for object lookup. rw, MockSystemReader the MockSystemReader to use for clock and other system
operations. reader)Wrap a repository with test building tools. |
| Modifier and Type | Method and Description |
|---|---|
| public TestRepository | Returns: commit builder.the id of the commit to amend. id)Amend an existing commit. |
| private TestRepository | |
| public TestRepository | Returns: commit builder that amends the branch on commit.the name of the reference to amend, which must already exist.
If ref)ref does not start with refs/ and is not
the magic names HEAD FETCH_HEAD or MERGE_HEAD, then refs/heads/ will be prefixed in
front of the given name, thereby assuming it is a branch.Amend an existing ref. |
| private static void | |
| public RevBlob | |
| public RevBlob | Returns: the new, fully parsed blob.binary file content. content)Create a new blob object in the repository. |
| public TestRepository | |
| public RevCommit | Returns: the new, fully parsed commit, or null if no work was done due to the resulting tree being identical.commit-ish to cherry-pick. id)Cherry-pick a commit onto HEAD. |
| public void | close()
Implements java. Closes the underlying |
| public RevCommit | |
| public RevCommit | |
| public RevCommit | |
| public RevCommit | |
| public TestRepository | |
| public void | delete(String
the name of the reference to delete. This is normalized in the
same way as ref)update(String, AnyObjectId).Delete a reference. |
| public DirCacheEntry | |
| public void | |
| public RevObject | |
| public Date | |
| public Instant | |
| public R | |
| public RevWalk | |
| public TimeZone | Returns: timezone used for default identities.
Deprecated
since 7.2. Use
getTimeZoneId() instead.
Get timezone |
| public ZoneId | |
| public Git | Returns: an API wrapper for the underlying repository. This wrapper does not allocate any new resources and need not be closed (but closing it is harmless).Return Git API wrapper |
| public ObjectId | Returns: the tagged objectthe tag name. The /refs/tags/ prefix will be added if the name
doesn't start with it name, ObjectId the object to tag obj)Tag an object using a lightweight tag. |
| public DirCacheEntry | |
| private static String | |
| public void | |
| public < type of object, e.g. T extends RevObject> Torg.
or org.. | Returns: objectreference to the (possibly unparsed) object to force body
parsing of. object)Ensure the body of the given object has been parsed. |
| private static void | |
| public void | |
| public void | |
| public void | setAuthorAndCommitter(CommitBuilder
the commit builder to store. c)Set the author and committer using |
| public RevTag | |
| public void | tick(int
number of seconds to add to the current time. secDelta)Adjust the current time that will used by the next commit. |
| public RevTree | Returns: the new, fully parsed tree specified by the entry list.the files to include in the tree. The collection does not need
to be sorted properly and may be empty. entries)Construct a tree from a specific listing of file entries. |
| public ObjectId | Returns: the ID of the new commit.zero or more IDs of the commit's parents. parents)Create a new, unparsed commit. |
| public ObjectId | Returns: the ID of the new commit.number of seconds to advance secDelta, final RevTree tick(int) by.the root tree for the commit. tree, final ObjectId... zero or more IDs of the commit's parents. parents)Create a new, unparsed commit. |
| public RevCommit | Returns: the target object.the name of the reference to update to. If ref, TestRepository<R>.ref does
not start with refs/ and is not the magic names
HEAD FETCH_HEAD or MERGE_HEAD, then
refs/heads/ will be prefixed in front of the given
name, thereby assuming it is a branch.the target object. toUpdate a reference to point to an object. |
| public < type of the target object. T extends AnyObjectId> T | Returns: the target object.the name of the reference to update to. If ref, T ref does
not start with refs/ and is not the magic names
HEAD FETCH_HEAD or MERGE_HEAD, then
refs/heads/ will be prefixed in front of the given
name, thereby assuming it is a branch.the target object. obj)Update a reference to point to an object. |
| public void | |
| private void |