Update go dependencies and fix go-git (#28893)
More details are in the comment of repo_base_gogit.go And ref: https://github.com/go-git/go-git/issues/1006
This commit is contained in:
parent
c4cdebacfe
commit
82acf22d9c
5 changed files with 158 additions and 160 deletions
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
gitealog "code.gitea.io/gitea/modules/log"
|
||||
|
||||
"github.com/go-git/go-git/v5/plumbing/format/commitgraph"
|
||||
commitgraph "github.com/go-git/go-git/v5/plumbing/format/commitgraph/v2"
|
||||
cgobject "github.com/go-git/go-git/v5/plumbing/object/commitgraph"
|
||||
)
|
||||
|
||||
|
@ -22,7 +22,7 @@ func (r *Repository) CommitNodeIndex() (cgobject.CommitNodeIndex, *os.File) {
|
|||
|
||||
file, err := os.Open(indexPath)
|
||||
if err == nil {
|
||||
var index commitgraph.Index // TODO: in newer go-git, it might need to use "github.com/go-git/go-git/v5/plumbing/format/commitgraph/v2" package to compile
|
||||
var index commitgraph.Index
|
||||
index, err = commitgraph.OpenFileIndex(file)
|
||||
if err == nil {
|
||||
return cgobject.NewGraphCommitNodeIndex(index, r.gogitRepo.Storer), file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue