6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-09 21:34:15 +00:00

Add a basic branch iterator for getting branches state

This commit is contained in:
Grzegorz Dlugoszewski
2020-05-18 17:35:32 +02:00
parent 13f69bb4b5
commit 4ce4381c57
3 changed files with 59 additions and 5 deletions

18
branch_test.go Normal file
View File

@@ -0,0 +1,18 @@
package main
import (
"fmt"
"testing"
git "github.com/libgit2/git2go/v30"
)
func TestBranches(t *testing.T) {
repo, err := git.OpenRepository("/home/grdl/workspace/gitlab.com/grdl/git-get")
checkFatal(t, err)
branches, err := Branches(repo)
checkFatal(t, err)
fmt.Println(len(branches))
}