Example #1
0
            CommitBuilder(TestRepository testRepository, CommitBuilder prior)
            {
                _testRepository = testRepository;
                branch          = prior.branch;

                DirCacheBuilder b = tree.builder();

                for (int i = 0; i < prior.tree.getEntryCount(); i++)
                {
                    b.add(prior.tree.getEntry(i));
                }
                b.finish();

                parents.Add(prior.create());
            }
Example #2
0
 /**
  * Forcefully update this branch to a particular commit.
  *
  * @param to
  *            the commit to update to.
  * @return {@code to}.
  * @throws Exception
  */
 public RevCommit update(CommitBuilder to)
 {
     return(update(to.create()));
 }
Example #3
0
 /**
  * Update a reference to point to an object.
  *
  * @param ref
  *            the name of the reference to update to. If {@code ref} does
  *            not start with {@code refs/} and is not the magic names
  *            {@code HEAD} {@code FETCH_HEAD} or {@code MERGE_HEAD}, then
  *            {@code refs/heads/} will be prefixed in front of the given
  *            name, thereby assuming it is a branch.
  * @param to
  *            the target object.
  * @return the target object.
  * @throws Exception
  */
 public RevCommit update(String @ref, CommitBuilder to)
 {
     return(update(@ref, to.create()));
 }