Implemented branch functions. #45
Loading…
Reference in New Issue
No description provided.
Delete Branch "branch_functions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I implemented the branch functions found in the libgit2 API doc.
These changes introduce a new data type: Branch which directly inherits form Reference.
The functions which work on a Repository are glued to the Repository type, functions which work on a Branch a glued to the Branch type.
The Implementation for BranchForeach() is a port form the original C implementation. The payload of the callback function is a interface and can be used with a type assertion.
The callback function returns a error which can be a custom error value defined by the user. A default error value (ErrEUser) for the callback is already provided.
I deleted the BranchForeach function like you mentioned.