Skip to content

Commit

Permalink
Disable pulling on git init (#170)
Browse files Browse the repository at this point in the history
Due to go-git issue #305
(go-git/go-git#305) - pulling
on shallow clone leads to object not found error.
  • Loading branch information
asutosh committed May 3, 2023
1 parent fed081d commit ab32a9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func Init(repoName, owner, branch string, depth int, dir, ghToken string) (*GitR
log.Error().Err(err).Msg("Error getting worktree")
return nil, err
}
/* FIXME: Re enable pulling once issue #305(https://github.com/go-git/go-git/issues/305) is fixed.
err = w.Pull(&git.PullOptions{
SingleBranch: true,
Progress: os.Stdout,
Expand All @@ -121,7 +122,7 @@ func Init(repoName, owner, branch string, depth int, dir, ghToken string) (*GitR
if err == transport.ErrEmptyUploadPackRequest {
log.Debug().Err(err).Str("branch", branch).Str("remote", fqrn).Msg("empty upload pack request- https://github.com/go-git/go-git/issues/328")
err = nil
}
}*/

return &GitRepo{
Name: repoName,
Expand Down

0 comments on commit ab32a9e

Please sign in to comment.