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:
18
branch_test.go
Normal file
18
branch_test.go
Normal 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))
|
||||
}
|
||||
Reference in New Issue
Block a user