diff --git a/.gopmfile b/.gopmfile index ab1550b9e4..7bec357b93 100644 --- a/.gopmfile +++ b/.gopmfile @@ -18,7 +18,7 @@ github.com/go-xorm/core = commit:5bf745d github.com/go-xorm/xorm = commit:c6c7056 github.com/gogits/chardet = commit:2404f77 github.com/gogits/cron = commit:7f3990a -github.com/gogits/git-module = commit:7b206b5 +github.com/gogits/git-module = commit:0a18ab0 github.com/gogits/go-gogs-client = commit:c52f7ee github.com/issue9/identicon = commit:d36b545 github.com/jaytaylor/html2text = commit:52d9b78 diff --git a/README.md b/README.md index cfaaf07205..c53cc7b7cc 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra ![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true) -##### Current tip version: 0.9.88 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions) +##### Current tip version: 0.9.89 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions) | Web | UI | Preview | |:-------------:|:-------:|:-------:| diff --git a/cmd/web.go b/cmd/web.go index 06f94c787c..b4c63a53b5 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -88,7 +88,7 @@ func checkVersion() { {"github.com/go-macaron/toolbox", toolbox.Version, "0.1.0"}, {"gopkg.in/ini.v1", ini.Version, "1.8.4"}, {"gopkg.in/macaron.v1", macaron.Version, "1.1.7"}, - {"github.com/gogits/git-module", git.Version, "0.3.8"}, + {"github.com/gogits/git-module", git.Version, "0.4.0"}, {"github.com/gogits/go-gogs-client", gogs.Version, "0.12.1"}, } for _, c := range checkers { diff --git a/glide.lock b/glide.lock index f5bf62ed64..32c9ad698a 100644 --- a/glide.lock +++ b/glide.lock @@ -41,7 +41,7 @@ imports: - name: github.com/gogits/cron version: 7f3990acf1833faa5ebd0e86f0a4c72a4b5eba3c - name: github.com/gogits/git-module - version: 7b206b529a09ae8cfa1df52a6c0cdd2612cfc6fc + version: 0a18ab0f2b896dbf510de515a00a698a2de5719c - name: github.com/gogits/go-gogs-client version: c52f7ee0cc58d3cd6e379025552873a8df6de322 - name: github.com/issue9/identicon diff --git a/gogs.go b/gogs.go index 25a277db97..ead45c36af 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.9.88.0827" +const APP_VER = "0.9.89.0827" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) 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) diff --git a/models/repo_editor.go b/models/repo_editor.go index e89ad0a401..a773c8d36f 100644 --- a/models/repo_editor.go +++ b/models/repo_editor.go @@ -127,11 +127,11 @@ func (repo *Repository) UpdateRepoFile(doer *User, opts UpdateRepoFileOptions) ( if err = git.AddChanges(localPath, true); err != nil { return fmt.Errorf("git add --all: %v", err) - } - - signaure := doer.NewGitSig() - if err = git.CommitChanges(localPath, opts.Message, signaure); err != nil { - return fmt.Errorf("git commit -m %s --author='%s <%s>': %v", opts.Message, signaure.Name, signaure.Email, err) + } else if err = git.CommitChanges(localPath, git.CommitChangesOptions{ + Committer: doer.NewGitSig(), + Message: opts.Message, + }); err != nil { + return fmt.Errorf("CommitChanges: %v", err) } else if err = git.Push(localPath, "origin", opts.NewBranch); err != nil { return fmt.Errorf("git push origin %s: %v", opts.NewBranch, err) } @@ -254,11 +254,11 @@ func (repo *Repository) DeleteRepoFile(doer *User, opts DeleteRepoFileOptions) ( if err = git.AddChanges(localPath, true); err != nil { return fmt.Errorf("git add --all: %v", err) - } - - signaure := doer.NewGitSig() - if err = git.CommitChanges(localPath, opts.Message, signaure); err != nil { - return fmt.Errorf("git commit -m %s --author='%s <%s>': %v", opts.Message, signaure.Name, signaure.Email, err) + } else if err = git.CommitChanges(localPath, git.CommitChangesOptions{ + Committer: doer.NewGitSig(), + Message: opts.Message, + }); err != nil { + return fmt.Errorf("CommitChanges: %v", err) } else if err = git.Push(localPath, "origin", opts.Branch); err != nil { return fmt.Errorf("git push origin %s: %v", opts.Branch, err) } diff --git a/models/user.go b/models/user.go index 7ec5e12b2f..fa6bbacb7c 100644 --- a/models/user.go +++ b/models/user.go @@ -308,7 +308,7 @@ func (u *User) GetFollowing(page int) ([]*User, error) { // NewGitSig generates and returns the signature of given user. func (u *User) NewGitSig() *git.Signature { return &git.Signature{ - Name: u.Name, + Name: u.DisplayName(), Email: u.Email, When: time.Now(), } diff --git a/models/wiki.go b/models/wiki.go index 2f57eadda6..f62cd2ac79 100644 --- a/models/wiki.go +++ b/models/wiki.go @@ -129,7 +129,10 @@ func (repo *Repository) updateWikiPage(doer *User, oldTitle, title, content, mes } 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", "master"); err != nil { return fmt.Errorf("Push: %v", err) @@ -165,7 +168,10 @@ func (repo *Repository) DeleteWikiPage(doer *User, title string) (err error) { 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", "master"); err != nil { return fmt.Errorf("Push: %v", err) diff --git a/templates/.VERSION b/templates/.VERSION index a3ab1840a3..3c9e54a446 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.9.88.0827 \ No newline at end of file +0.9.89.0827 \ No newline at end of file