diff options
Diffstat (limited to 'modules/git/repo_compare.go')
-rw-r--r-- | modules/git/repo_compare.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/git/repo_compare.go b/modules/git/repo_compare.go index 3c7af73000..577c9f475e 100644 --- a/modules/git/repo_compare.go +++ b/modules/git/repo_compare.go @@ -132,7 +132,7 @@ type lineCountWriter struct { func (l *lineCountWriter) Write(p []byte) (n int, err error) { n = len(p) l.numLines += bytes.Count(p, []byte{'\000'}) - return + return n, err } // GetDiffNumChangedFiles counts the number of changed files @@ -177,7 +177,7 @@ func (repo *Repository) GetDiffShortStat(base, head string) (numFiles, totalAddi if err != nil && strings.Contains(err.Error(), "no merge base") { return GetDiffShortStat(repo.Ctx, repo.Path, base, head) } - return + return numFiles, totalAdditions, totalDeletions, err } // GetDiffShortStat counts number of changed files, number of additions and deletions @@ -231,7 +231,7 @@ func parseDiffStat(stdout string) (numFiles, totalAdditions, totalDeletions int, return 0, 0, 0, fmt.Errorf("unable to parse shortstat: %s. Error parsing NumDeletions %v", stdout, err) } } - return + return numFiles, totalAdditions, totalDeletions, err } // GetDiffOrPatch generates either diff or formatted patch data between given revisions |