Skip to content

Commit

Permalink
use --follow on file history to show log across renames (go-gitea#37)
Browse files Browse the repository at this point in the history
* use --follow on file history to show log across renames

* revert changes in commitsByRange
  • Loading branch information
philfry authored and lunny committed Mar 21, 2017
1 parent 3374688 commit 5b41327
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion repo_commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (repo *Repository) FileCommitsCount(revision, file string) (int64, error) {

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

0 comments on commit 5b41327

Please sign in to comment.