Skip to content

Commit ca1307b

Browse files
authored
fix: resolved issues with go-git 5.11.0 (#2543)
1 parent b7d0b42 commit ca1307b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build/internal/cmd/gitea/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func main() {
6868
fmt.Fprintln(os.Stderr, "Creating Repository from", *testdataDir)
6969

7070
repo, err := git.InitWithOptions(memory.NewStorage(), workdir, git.InitOptions{
71-
DefaultBranch: "main",
71+
DefaultBranch: "refs/heads/main",
7272
})
7373
fatalOnError(err)
7474

@@ -126,7 +126,7 @@ func main() {
126126
repo.Push(&git.PushOptions{
127127
Auth: &githttp.BasicAuth{Username: "root", Password: "password"},
128128
RemoteName: "origin",
129-
RefSpecs: []config.RefSpec{"main:refs/heads/main"},
129+
RefSpecs: []config.RefSpec{"refs/heads/main:refs/heads/main"},
130130
})
131131
fmt.Fprintln(os.Stderr, "Pushed")
132132

0 commit comments

Comments
 (0)