mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
Update code.gitea.io/git (#1824)
* Update code.gitea.io/git * Update function calls * govendor fetch
This commit is contained in:
@@ -907,7 +907,10 @@ func (pr *PullRequest) PushToBaseRepo() (err error) {
|
||||
|
||||
_ = os.Remove(file)
|
||||
|
||||
if err = git.Push(headRepoPath, tmpRemoteName, fmt.Sprintf("%s:%s", pr.HeadBranch, headFile)); err != nil {
|
||||
if err = git.Push(headRepoPath, git.PushOptions{
|
||||
Remote: tmpRemoteName,
|
||||
Branch: fmt.Sprintf("%s:%s", pr.HeadBranch, headFile),
|
||||
}); err != nil {
|
||||
return fmt.Errorf("Push: %v", err)
|
||||
}
|
||||
|
||||
|
@@ -2342,7 +2342,10 @@ func (repo *Repository) CreateNewBranch(doer *User, oldBranchName, branchName st
|
||||
return fmt.Errorf("CreateNewBranch: %v", err)
|
||||
}
|
||||
|
||||
if err = git.Push(localPath, "origin", branchName); err != nil {
|
||||
if err = git.Push(localPath, git.PushOptions{
|
||||
Remote: "origin",
|
||||
Branch: branchName,
|
||||
}); err != nil {
|
||||
return fmt.Errorf("Push: %v", err)
|
||||
}
|
||||
|
||||
|
@@ -136,7 +136,10 @@ func (repo *Repository) UpdateRepoFile(doer *User, opts UpdateRepoFileOptions) (
|
||||
Message: opts.Message,
|
||||
}); err != nil {
|
||||
return fmt.Errorf("CommitChanges: %v", err)
|
||||
} else if err = git.Push(localPath, "origin", opts.NewBranch); err != nil {
|
||||
} else if err = git.Push(localPath, git.PushOptions{
|
||||
Remote: "origin",
|
||||
Branch: opts.NewBranch,
|
||||
}); err != nil {
|
||||
return fmt.Errorf("git push origin %s: %v", opts.NewBranch, err)
|
||||
}
|
||||
|
||||
@@ -273,7 +276,10 @@ func (repo *Repository) DeleteRepoFile(doer *User, opts DeleteRepoFileOptions) (
|
||||
Message: opts.Message,
|
||||
}); err != nil {
|
||||
return fmt.Errorf("CommitChanges: %v", err)
|
||||
} else if err = git.Push(localPath, "origin", opts.NewBranch); err != nil {
|
||||
} else if err = git.Push(localPath, git.PushOptions{
|
||||
Remote: "origin",
|
||||
Branch: opts.NewBranch,
|
||||
}); err != nil {
|
||||
return fmt.Errorf("git push origin %s: %v", opts.NewBranch, err)
|
||||
}
|
||||
|
||||
@@ -509,7 +515,10 @@ func (repo *Repository) UploadRepoFiles(doer *User, opts UploadRepoFileOptions)
|
||||
Message: opts.Message,
|
||||
}); err != nil {
|
||||
return fmt.Errorf("CommitChanges: %v", err)
|
||||
} else if err = git.Push(localPath, "origin", opts.NewBranch); err != nil {
|
||||
} else if err = git.Push(localPath, git.PushOptions{
|
||||
Remote: "origin",
|
||||
Branch: opts.NewBranch,
|
||||
}); err != nil {
|
||||
return fmt.Errorf("git push origin %s: %v", opts.NewBranch, err)
|
||||
}
|
||||
|
||||
|
@@ -163,7 +163,10 @@ func (repo *Repository) updateWikiPage(doer *User, oldWikiPath, wikiPath, conten
|
||||
Message: message,
|
||||
}); err != nil {
|
||||
return fmt.Errorf("CommitChanges: %v", err)
|
||||
} else if err = git.Push(localPath, "origin", "master"); err != nil {
|
||||
} else if err = git.Push(localPath, git.PushOptions{
|
||||
Remote: "origin",
|
||||
Branch: "master",
|
||||
}); err != nil {
|
||||
return fmt.Errorf("Push: %v", err)
|
||||
}
|
||||
|
||||
@@ -209,7 +212,10 @@ func (repo *Repository) DeleteWikiPage(doer *User, wikiPath string) (err error)
|
||||
Message: message,
|
||||
}); err != nil {
|
||||
return fmt.Errorf("CommitChanges: %v", err)
|
||||
} else if err = git.Push(localPath, "origin", "master"); err != nil {
|
||||
} else if err = git.Push(localPath, git.PushOptions{
|
||||
Remote: "origin",
|
||||
Branch: "master",
|
||||
}); err != nil {
|
||||
return fmt.Errorf("Push: %v", err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user