module Grit
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].. >> file-index
converted from the gitrb project
authors:
Matthias Lederhofer <matled@gmx.net> Simon 'corecode' Schubert <corecode@fs.ei.tum.de> Scott Chacon <schacon@gmail.com>
provides native ruby access to git objects and pack files
Attributes
debug[RW]
Set debug
to true to log all git calls and responses
logger[RW]
The standard logger
for debugging git calls - this defaults to a plain STDOUT logger
use_git_ruby[RW]
Public Class Methods
log(str)
click to toggle source
# File lib/grit/lib/grit.rb, line 62 def log(str) logger.debug { str } end
version()
click to toggle source
# File lib/grit/lib/grit.rb, line 71 def self.version yml = YAML.load(File.read(File.join(File.dirname(__FILE__), *%w[.. VERSION.yml]))) "#{yml[:major]}.#{yml[:minor]}.#{yml[:patch]}" end