Use commit graph files for listing pages (#7314)

* Experimental support for git commit graph files and bloom filter index

Signed-off-by: Filip Navara <filip.navara@gmail.com>

* Force vendor of commitgraph

Signed-off-by: Filip Navara <filip.navara@gmail.com>

* Remove bloom filter experiment and debug prints

* Remove old code for building commit graphs

* Remove unused function

* Remove mmap usage

* gofmt

* sort vendor/modules.txt

* Add copyright header and log commit-graph error
This commit is contained in:
Filip Navara 2019-07-02 04:15:14 +02:00 committed by Lunny Xiao
parent e728b55812
commit 6e2a59e4ce
14 changed files with 1166 additions and 13 deletions

View file

@ -50,7 +50,17 @@ func GetNote(repo *Repository, commitID string, note *Note) error {
return err
}
lastCommits, err := getLastCommitForPaths(commit, "", []string{commitID})
commitNodeIndex, commitGraphFile := repo.CommitNodeIndex()
if commitGraphFile != nil {
defer commitGraphFile.Close()
}
commitNode, err := commitNodeIndex.Get(commit.Hash)
if err != nil {
return nil
}
lastCommits, err := getLastCommitForPaths(commitNode, "", []string{commitID})
if err != nil {
return err
}