summaryrefslogtreecommitdiffstats
path: root/modules/git/repo.go
diff options
context:
space:
mode:
authorjaqra <48099350+jaqra@users.noreply.github.com>2019-11-07 21:09:51 +0300
committerLauris BH <lauris@nix.lv>2019-11-07 20:09:51 +0200
commit065bbddab91791666ef1d0e10765f58595094a1e (patch)
tree2c6aa684fc738d5d0111176ad42480bb5bc9fb1e /modules/git/repo.go
parent1f90147f3942065e2a7f564e8a3c97d23d41e6c0 (diff)
downloadgitea-065bbddab91791666ef1d0e10765f58595094a1e.tar.gz
gitea-065bbddab91791666ef1d0e10765f58595094a1e.zip
Fix count for commit graph last page (#8843)
* Fix count for commit graph last page * Remove used once variable * Move func to model * capitalize method name * fix error message
Diffstat (limited to 'modules/git/repo.go')
-rw-r--r--modules/git/repo.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/git/repo.go b/modules/git/repo.go
index e1d75ca4aa..4c6690b913 100644
--- a/modules/git/repo.go
+++ b/modules/git/repo.go
@@ -46,6 +46,11 @@ type GPGSettings struct {
const prettyLogFormat = `--pretty=format:%H`
+// GetAllCommitsCount returns count of all commits in repository
+func (repo *Repository) GetAllCommitsCount() (int64, error) {
+ return AllCommitsCount(repo.Path)
+}
+
func (repo *Repository) parsePrettyFormatLogToList(logs []byte) (*list.List, error) {
l := list.New()
if len(logs) == 0 {