Package org.eclipse.jgit.junit
Class TestRepository.BranchBuilder
java.lang.Object
org.eclipse.jgit.junit.TestRepository.BranchBuilder
- Enclosing class:
TestRepository<R extends Repository>
Helper to build a branch with one or more commits
-
Field Details
-
ref
-
-
Constructor Details
-
BranchBuilder
BranchBuilder(String ref)
-
-
Method Details
-
commit
- Returns:
- construct a new commit builder that updates this branch. If the branch already exists, the commit builder will have its first parent as the current commit and its tree will be initialized to the current files.
- Throws:
Exception
- the commit builder can't read the current branch state
-
update
Forcefully update this branch to a particular commit.- Parameters:
to
- the commit to update to.- Returns:
to
.- Throws:
Exception
-
update
Forcefully update this branch to a particular commit.- Parameters:
to
- the commit to update to.- Returns:
to
.- Throws:
Exception
-
delete
Delete this branch.- Throws:
Exception
- Since:
- 4.4
-