Fix race when running commands with timeout (#1465)

Update vendored module code.gitea.io/git
This commit is contained in:
Mura Li 2017-04-08 10:23:39 +08:00 committed by Lunny Xiao
parent 5c0bee9b20
commit edbb9eefd6
4 changed files with 73 additions and 25 deletions

View file

@ -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