Skip to content

Commit 5b41327

Browse files
philfrylunny
authored andcommitted
use --follow on file history to show log across renames (go-gitea#37)
* use --follow on file history to show log across renames * revert changes in commitsByRange
1 parent 3374688 commit 5b41327

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

repo_commit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ func (repo *Repository) FileCommitsCount(revision, file string) (int64, error) {
229229

230230
// CommitsByFileAndRange return the commits accroding revison file and the page
231231
func (repo *Repository) CommitsByFileAndRange(revision, file string, page int) (*list.List, error) {
232-
stdout, err := NewCommand("log", revision, "--skip="+strconv.Itoa((page-1)*50),
232+
stdout, err := NewCommand("log", revision, "--follow", "--skip="+strconv.Itoa((page-1)*50),
233233
"--max-count="+strconv.Itoa(CommitsRangeSize), prettyLogFormat, "--", file).RunInDirBytes(repo.Path)
234234
if err != nil {
235235
return nil, err

0 commit comments

Comments
 (0)