Skip to content

Commit c0b917b

Browse files
authored
Migrate to go-git/go-git v5.0.0 (#10735) (#10753)
1 parent 54ea58d commit c0b917b

File tree

333 files changed

+15556
-92703
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

333 files changed

+15556
-92703
lines changed

contrib/pr/checkout.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ import (
2828
"code.gitea.io/gitea/routers"
2929
"code.gitea.io/gitea/routers/routes"
3030

31+
"github.com/go-git/go-git/v5"
32+
"github.com/go-git/go-git/v5/config"
33+
"github.com/go-git/go-git/v5/plumbing"
3134
context2 "github.com/gorilla/context"
3235
"github.com/unknwon/com"
33-
"gopkg.in/src-d/go-git.v4"
34-
"gopkg.in/src-d/go-git.v4/config"
35-
"gopkg.in/src-d/go-git.v4/plumbing"
3636
"gopkg.in/testfixtures.v2"
3737
"xorm.io/xorm"
3838
)

go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ require (
4141
github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 // indirect
4242
github.com/gliderlabs/ssh v0.2.2
4343
github.com/glycerine/go-unsnap-stream v0.0.0-20190901134440-81cf024a9e0a // indirect
44+
github.com/go-git/go-billy/v5 v5.0.0
45+
github.com/go-git/go-git/v5 v5.0.0
4446
github.com/go-openapi/jsonreference v0.19.3 // indirect
4547
github.com/go-redis/redis v6.15.2+incompatible
4648
github.com/go-sql-driver/mysql v1.4.1
@@ -80,7 +82,7 @@ require (
8082
github.com/quasoft/websspi v1.0.0
8183
github.com/remyoudompheng/bigfft v0.0.0-20190321074620-2f0d2b0e0001 // indirect
8284
github.com/satori/go.uuid v1.2.0
83-
github.com/sergi/go-diff v1.0.0
85+
github.com/sergi/go-diff v1.1.0
8486
github.com/shurcooL/httpfs v0.0.0-20190527155220-6a4d4a70508b // indirect
8587
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd
8688
github.com/steveyen/gtreap v0.0.0-20150807155958-0abe01ef9be2 // indirect
@@ -95,19 +97,17 @@ require (
9597
github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53
9698
github.com/yuin/goldmark v1.1.19
9799
go.etcd.io/bbolt v1.3.3 // indirect
98-
golang.org/x/crypto v0.0.0-20200219234226-1ad67e1f0ef4
99-
golang.org/x/net v0.0.0-20191101175033-0deb6923b6d9
100+
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073
101+
golang.org/x/net v0.0.0-20200301022130-244492dfa37a
100102
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
101-
golang.org/x/sys v0.0.0-20200219091948-cb0a6d8edb6c
103+
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527
102104
golang.org/x/text v0.3.2
103105
golang.org/x/tools v0.0.0-20191213221258-04c2e8eff935 // indirect
104106
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
105107
gopkg.in/asn1-ber.v1 v1.0.0-20150924051756-4e86f4367175 // indirect
106108
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
107109
gopkg.in/ini.v1 v1.51.1
108110
gopkg.in/ldap.v3 v3.0.2
109-
gopkg.in/src-d/go-billy.v4 v4.3.2
110-
gopkg.in/src-d/go-git.v4 v4.13.1
111111
gopkg.in/testfixtures.v2 v2.5.0
112112
mvdan.cc/xurls/v2 v2.1.0
113113
strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251

go.sum

Lines changed: 25 additions & 29 deletions
Large diffs are not rendered by default.

modules/git/blob.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"io"
1212
"io/ioutil"
1313

14-
"gopkg.in/src-d/go-git.v4/plumbing"
14+
"github.com/go-git/go-git/v5/plumbing"
1515
)
1616

1717
// Blob represents a Git object.

modules/git/commit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"strconv"
2121
"strings"
2222

23-
"gopkg.in/src-d/go-git.v4/plumbing/object"
23+
"github.com/go-git/go-git/v5/plumbing/object"
2424
)
2525

2626
// Commit represents a git commit.

modules/git/commit_info.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ package git
66

77
import (
88
"github.com/emirpasic/gods/trees/binaryheap"
9-
"gopkg.in/src-d/go-git.v4/plumbing"
10-
"gopkg.in/src-d/go-git.v4/plumbing/object"
11-
cgobject "gopkg.in/src-d/go-git.v4/plumbing/object/commitgraph"
9+
"github.com/go-git/go-git/v5/plumbing"
10+
"github.com/go-git/go-git/v5/plumbing/object"
11+
cgobject "github.com/go-git/go-git/v5/plumbing/object/commitgraph"
1212
)
1313

1414
// GetCommitsInfo gets information of all commits that are corresponding to these entries

modules/git/notes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package git
77
import (
88
"io/ioutil"
99

10-
"gopkg.in/src-d/go-git.v4/plumbing/object"
10+
"github.com/go-git/go-git/v5/plumbing/object"
1111
)
1212

1313
// NotesRef is the git ref where Gitea will look for git-notes data.

modules/git/parse.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"fmt"
1010
"strconv"
1111

12-
"gopkg.in/src-d/go-git.v4/plumbing/filemode"
13-
"gopkg.in/src-d/go-git.v4/plumbing/object"
12+
"github.com/go-git/go-git/v5/plumbing/filemode"
13+
"github.com/go-git/go-git/v5/plumbing/object"
1414
)
1515

1616
// ParseTreeEntries parses the output of a `git ls-tree` command.

modules/git/parse_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ package git
77
import (
88
"testing"
99

10+
"github.com/go-git/go-git/v5/plumbing/filemode"
11+
"github.com/go-git/go-git/v5/plumbing/object"
1012
"github.com/stretchr/testify/assert"
11-
"gopkg.in/src-d/go-git.v4/plumbing/filemode"
12-
"gopkg.in/src-d/go-git.v4/plumbing/object"
1313
)
1414

1515
func TestParseTreeEntries(t *testing.T) {

modules/git/repo.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ import (
1818
"time"
1919

2020
gitealog "code.gitea.io/gitea/modules/log"
21+
"github.com/go-git/go-billy/v5/osfs"
22+
gogit "github.com/go-git/go-git/v5"
23+
"github.com/go-git/go-git/v5/plumbing/cache"
24+
"github.com/go-git/go-git/v5/storage/filesystem"
2125
"github.com/unknwon/com"
22-
"gopkg.in/src-d/go-billy.v4/osfs"
23-
gogit "gopkg.in/src-d/go-git.v4"
24-
"gopkg.in/src-d/go-git.v4/plumbing/cache"
25-
"gopkg.in/src-d/go-git.v4/storage/filesystem"
2626
)
2727

2828
// Repository represents a Git repository.

0 commit comments

Comments
 (0)