summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-27 13:37:55 -0700
committerUnknwon <u@gogs.io>2016-08-27 13:37:55 -0700
commitc30b856d147dd895507c8f2334a11ed4baab6c18 (patch)
treeb0212b58f1026ba581f3f9c0ef1a366a5c4706df /models/repo.go
parent13c106af7764a0b4757348ab4c82dbf9154ee11c (diff)
downloadgitea-c30b856d147dd895507c8f2334a11ed4baab6c18.tar.gz
gitea-c30b856d147dd895507c8f2334a11ed4baab6c18.zip
#3505 use user’s info for committer and author
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go
index 14a5adeb55..1d425fe327 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -2303,7 +2303,10 @@ func (repo *Repository) UploadRepoFiles(doer *User, oldBranchName, branchName, t
if err = git.AddChanges(localPath, true); err != nil {
return fmt.Errorf("AddChanges: %v", err)
- } else if err = git.CommitChanges(localPath, message, doer.NewGitSig()); err != nil {
+ } else if err = git.CommitChanges(localPath, git.CommitChangesOptions{
+ Committer: doer.NewGitSig(),
+ Message: message,
+ }); err != nil {
return fmt.Errorf("CommitChanges: %v", err)
} else if err = git.Push(localPath, "origin", branchName); err != nil {
return fmt.Errorf("Push: %v", err)