fix: unstaged changes handling

See toolshed/organising#651
This commit is contained in:
2024-12-31 11:19:03 +01:00
parent bfed51a69c
commit 5975be6870
26 changed files with 622 additions and 56 deletions

15
pkg/git/read_test.go Normal file
View File

@ -0,0 +1,15 @@
package git
import (
"errors"
"testing"
"github.com/go-git/go-git/v5"
"github.com/stretchr/testify/assert"
)
func TestIsClean(t *testing.T) {
isClean, err := IsClean("/tmp")
assert.Equal(t, isClean, false)
assert.True(t, errors.Is(err, git.ErrRepositoryNotExists))
}