Class Grit::GitRuby::Repository
In: lib/grit/git-ruby/repository.rb
Parent: Object

Methods

Classes and Modules

Class Grit::GitRuby::Repository::NoSuchPath
Class Grit::GitRuby::Repository::NoSuchShaFound

Attributes

git_dir  [RW] 
options  [RW] 

Public Class methods

initialize a git repository

Public Instance methods

returns the raw file contents of this sha

returns the file size (as an int) of this sha

returns the file type (as a symbol) of this sha

returns true if the files in path_limiter were changed, or no path limiter used by the log() function when passed with a path_limiter

returns GitRuby object of any type given a SHA1

returns a raw object given a SHA1

Grabs tree contents recursively,

  e.g. `git ls-tree -r sha`

returns true if the hex-packed sha is in the loose objects

returns true if the hex-packed sha is in the packfiles

returns a 2-d hash of the tree

‘blob’][‘FILENAME‘
= {:mode => ‘100644’, :sha => SHA}
‘tree’][‘DIRNAME‘
= {:mode => ‘040000’, :sha => SHA}

returns an array of GitRuby Commit objects

[sha, raw_output], [sha, raw_output], [sha, raw_output
… ]

takes the following options:

 :since - Time object specifying that you don't want commits BEFORE this
 :until - Time object specifying that you don't want commit AFTER this
 :first_parent - tells log to only walk first parent
 :path_limiter - string or array of strings to limit path
 :max_count - number to limit the output

returns the loose objects object lazily

returns the raw (cat-file) output for a tree if given a commit sha, it will print the tree of that commit if given a path limiter array, it will limit the output to those if asked for recrusive trees, will traverse trees

return array of tree entries

 TODO : refactor this to remove the fugly

returns true or false if that sha exists in the db

returns the array of pack list objects

writes a raw object into the git repo

takes 2 tree shas and recursively walks them to find out what files or directories have been modified in them and returns an array of changes [ [full_path, ‘added’, tree1_hash, nil],

  [full_path, 'removed', nil, tree2_hash],
  [full_path, 'modified', tree1_hash, tree2_hash]
 ]

prints out the type, shas and content of all of the pack files

called by log() to recursively walk the tree

Protected Instance methods

[Validate]