Git repository we manage.
Should we fetch the latest stuff?
Verify working tree state to make sure we don't clobber user changes?
Repository provider
Base name of the repository directory
Ensure the repository's HEAD is as indicated.
Returns the SHA1 of the given named ref.
Return the commit the repository HEAD is pointing at. Cache the result.
Ensure that the specified commit is fetched.
Update the remote. Return true if any updates were fetched.
True when we know that the repository is currently clean.
Ensure the repository's working copy is clean.
How to merge a branch into another
Returns the hash of the merge between the target and branch commits. Performs the merge if necessary. Caches the result.
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.
Finds and returns the merge parents of the given merge commit. Queries the git repository if necessary. Caches the result.
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.
Return SHA1 of the given remote ref. Fetches the remote first, unless offline mode is on.
Return SHA1 of the given pull request #. Fetches the pull request first, unless offline mode is on.
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 working tree "state". This returns a file list, along with size and modification time.
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.
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.
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.
Reset internal state.
Override to add logging.
Base class for a DManager Git repository.