diff options
author | Unknwon <u@gogs.io> | 2015-12-09 20:46:05 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-12-09 20:46:05 -0500 |
commit | 9a2e43bff28ac92f180109fe900a6997614ea5a8 (patch) | |
tree | 564dbb6fb30c153e43b0e18499d80e7d93dd0bee /models/repo.go | |
parent | bd5dc626e82e18d3e619d918e579dc130edcd1fa (diff) | |
download | gitea-9a2e43bff28ac92f180109fe900a6997614ea5a8.tar.gz gitea-9a2e43bff28ac92f180109fe900a6997614ea5a8.zip |
move out git module and #1573 send push hook
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go index f51396c5ca..307f86cb25 100644 --- a/models/repo.go +++ b/models/repo.go @@ -98,7 +98,7 @@ func NewRepoContext() { } // Check Git version. - gitVer, err := git.Version() + gitVer, err := git.BinVersion() if err != nil { log.Fatal(4, "Fail to get Git version: %v", err) } @@ -309,6 +309,10 @@ func (repo *Repository) RepoLink() string { return setting.AppSubUrl + "/" + repo.MustOwner().Name + "/" + repo.Name } +func (repo *Repository) ComposeCompareURL(oldCommitID, newCommitID string) string { + return fmt.Sprintf("%s/%s/compare/%s...%s", repo.MustOwner().Name, repo.Name, oldCommitID, newCommitID) +} + func (repo *Repository) FullRepoLink() string { return setting.AppUrl + repo.MustOwner().Name + "/" + repo.Name } |