summaryrefslogtreecommitdiffstats
path: root/models/repo_editor.go
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-05-30 05:32:01 -0400
committerBo-Yi Wu <appleboy.tw@gmail.com>2017-05-30 04:32:01 -0500
commit474d6367946c661ea4b8a6b8b25fab1b5bec15d2 (patch)
treeae284947e02ce992552b863fe20519be10a1f227 /models/repo_editor.go
parent367ff327edc6d2865e32d6e8c6fbdd216c4ab730 (diff)
downloadgitea-474d6367946c661ea4b8a6b8b25fab1b5bec15d2.tar.gz
gitea-474d6367946c661ea4b8a6b8b25fab1b5bec15d2.zip
Update code.gitea.io/git (#1824)
* Update code.gitea.io/git * Update function calls * govendor fetch
Diffstat (limited to 'models/repo_editor.go')
-rw-r--r--models/repo_editor.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/models/repo_editor.go b/models/repo_editor.go
index c675e1cfa8..40898dd4c2 100644
--- a/models/repo_editor.go
+++ b/models/repo_editor.go
@@ -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)
}