To implement the behaviour of the supporting branch types that git-flow uses, so called branch managers are used. BranchManager is the abstract base class for all concrete branch managers. Each type of branch in git-flow (e.g. feature, release, hotfix and support branches) has a corresponding branch manager.
A branch manager is responsible for listing, creating, merging, deleting, finishing (i.e. merging+deleting) branches of a given type. Most of the functionality is already implemented by the base BranchManager, so that subclassing a branch manager is easy.
Initializes an instance of BranchManager. A branch manager is responsible for listing, creating, merging, deleting, finishing (i.e. merging+deleting) branches of a given type.
Parameters: |
|
---|
If exactly one branch of the type that this manager manages starts with the given name prefix, returns that branch. Raises NoSuchBranchError in case no branches exist with the given prefix, or PrefixNotUniqueError in case multiple matches are found.
Parameters: | nameprefix – The name prefix (or full name) of the short branch name to match. |
---|---|
Returns: | The git.refs.Head instance of the branch that can be uniquely identified by the given name prefix. |
Creates a branch of the type that this manager manages and checks it out.
Parameters: |
|
---|---|
Returns: | The newly created git.refs.Head reference. |
Returns: | The name of branch to use as the default base for branching off from in case no explicit base is specified. |
---|
This method can be overriden in a subclass of BranchManager. If not overriden, the default is to use the ‘develop’ branch.
This deletes a branch of the type that this manager manages named name.
Parameters: |
|
---|
Returns: |
---|
An iterator, iterating over all branches of the type that this manager manages.
This merges the branch named name into the branch named into, using commit message message.
Parameters: |
|
---|
You typically don’t need to override this method in a subclass.
Returns the friendly (short) name of this branch, without the prefix, given the fully qualified branch name.
Parameters: | full_name – The full name of the branch as it is known to Git, including the prefix. |
---|---|
Returns: | The friendly name of the branch. |