file_index.rb

Path: lib/grit/git-ruby/file_index.rb
Last Update: Tue Jan 27 20:28:39 -0800 2009

this implements a file-based ‘file index’, an simple index of all of the reachable commits in a repo, along with the parents and which files were modified during each commit

this class looks for a file named ’[.git]/file-index’, generated via:

git log —pretty=oneline —name-only —parents —reverse —all > file-index

for this to work properly, you‘ll want to add the following as a post-receive hook to keep the index up to date

git log —pretty=oneline —name-only —parents —reverse [old-rev]..[new-rev] >> file-index

Required files

benchmark  

[Validate]