refactor: use central logger
This commit is contained in:
@ -3,9 +3,9 @@ package git
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
"github.com/go-git/go-git/v5"
|
||||
"github.com/go-git/go-git/v5/plumbing/object"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Init inits a new repo and commits all the stuff if you want
|
||||
@ -13,7 +13,7 @@ func Init(repoPath string, commit bool, gitName, gitEmail string) error {
|
||||
if _, err := git.PlainInit(repoPath, false); err != nil {
|
||||
return fmt.Errorf("git init: %s", err)
|
||||
}
|
||||
logrus.Debugf("initialised new git repo in %s", repoPath)
|
||||
log.Debugf("initialised new git repo in %s", repoPath)
|
||||
|
||||
if commit {
|
||||
commitRepo, err := git.PlainOpen(repoPath)
|
||||
@ -37,7 +37,7 @@ func Init(repoPath string, commit bool, gitName, gitEmail string) error {
|
||||
if _, err = commitWorktree.Commit("init", &git.CommitOptions{Author: author}); err != nil {
|
||||
return fmt.Errorf("git commit: %s", err)
|
||||
}
|
||||
logrus.Debugf("init committed all files for new git repo in %s", repoPath)
|
||||
log.Debugf("init committed all files for new git repo in %s", repoPath)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user