libgit2/git2go — pull request #45 by JohannWeging (2013-10-08 00:25:55+00:00)
Title: Implemented branch functions.

I implemented the branch functions found in the [libgit2 API doc] (http://libgit2.github.com/libgit2/#HEAD/group/branch).
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.