mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-11 17:50:58 +00:00
cleanup logging statements
This commit is contained in:
parent
4249f78120
commit
a8b6f2843d
2 changed files with 5 additions and 7 deletions
|
@ -18,7 +18,7 @@ import (
|
|||
log "github.com/sirupsen/logrus"
|
||||
git "gopkg.in/src-d/go-git.v4"
|
||||
"gopkg.in/src-d/go-git.v4/plumbing"
|
||||
"gopkg.in/yaml.v2"
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
var cloneLock sync.Mutex
|
||||
|
@ -212,17 +212,16 @@ func NewGitCloneExecutor(input NewGitCloneExecutorInput) Executor {
|
|||
|
||||
err = w.Pull(&git.PullOptions{
|
||||
ReferenceName: refName,
|
||||
Force: true,
|
||||
})
|
||||
if err != nil {
|
||||
if err != nil && err.Error() != "already up-to-date" {
|
||||
input.Logger.Errorf("Unable to pull %s: %v", refName, err)
|
||||
}
|
||||
input.Logger.Debugf("Cloned %s to %s", input.URL.String(), input.Dir)
|
||||
|
||||
err = w.Checkout(&git.CheckoutOptions{
|
||||
//Branch: plumbing.NewHash(ref),
|
||||
Branch: refName,
|
||||
//Hash: plumbing.NewHash(input.Ref),
|
||||
Force: true,
|
||||
Force: true,
|
||||
})
|
||||
if err != nil {
|
||||
input.Logger.Errorf("Unable to checkout %s: %v", refName, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue