1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
package git
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestNextBranch(t *testing.T) {
}
func TestPreviousBranch(t *testing.T) {
}
func TestRevlistNew(t *testing.T) {
th := InitTestRepositoryFromLocal(t)
defer th.CleanUp(t)
r := th.Repository
// HEAD..@{u}
headref, err := r.Repo.Head()
if err != nil {
t.Fatalf("Test Failed. error: %s", err.Error())
}
head := headref.Hash().String()
pullables, err := RevList(r, RevListOptions{
Ref1: head,
Ref2: r.State.Branch.Upstream.Reference.Hash().String(),
})
require.NoError(t, err)
require.Empty(t, pullables)
pushables, err := RevList(r, RevListOptions{
Ref1: r.State.Branch.Upstream.Reference.Hash().String(),
Ref2: head,
})
require.NoError(t, err)
require.Empty(t, pushables)
}
|