How to merge a branch into another
Verify that the state of the working tree matches the one when saveState was last called. Throw an exception otherwise. This and clearState should be called before any git command which destroys working directory changes.
Delete the saved working tree state, if any.
Return SHA1 (base, tip) of the given branch (possibly of GitHub fork). Fetches the fork first, unless offline mode is on. (This is a thin wrapper around getRemoteRef.)
Find the child of a commit, and, if the commit was a merge, the mainline index of said commit for the child.
Return the commit the repository HEAD is pointing at. Cache the result.
Returns the hash of the merge between the target and branch commits. Performs the merge if necessary. Caches the result.
Finds and returns the merge parents of the given merge commit. Queries the git repository if necessary. Caches the result.
Return SHA1 of the given pull request #. Fetches the pull request first, unless offline mode is on.
Returns the SHA1 of the given named ref.
Return SHA1 of the given remote ref. Fetches the remote first, unless offline mode is on.
Repository provider
Returns the resulting hash when reverting the branch from the base commit. Performs the revert if necessary. Caches the result. mainline is the 1-based mainline index (as per man git-revert), or 0 if commit is not a merge commit.
Return the working tree "state". This returns a file list, along with size and modification time.
Follows the string of merges starting from the given head commit, up till the merge with the given branch. Then, reapplies all merges in order, except for that with the given branch.
Override to add logging.
Ensure the repository's working copy is clean.
Ensure that the specified commit is fetched.
Ensure the repository's HEAD is as indicated.
Reset internal state.
Save the state of just one file. This should be called after automatic edits to repository files during a build. The file parameter should be relative to the directory root, and use forward slashes.
Save the state of the working tree for versioned files to a .json file, which can later be verified with checkState. This should be called after any git command which mutates the git state.
Update the remote. Return true if any updates were fetched.
Git repository we manage.
Base name of the repository directory
Base class for a managed repository.