Class | Grit::Tree |
In: |
lib/grit/tree.rb
|
Parent: | Object |
id | [R] | |
mode | [R] | |
name | [R] |
Construct the contents of the tree
+repo+ is the Repo +treeish+ is the reference +paths+ is an optional Array of directory paths to restrict the tree
Returns Grit::Tree (baked)
Create an unbaked Tree containing just the specified attributes
+repo+ is the Repo +atts+ is a Hash of instance variable data
Returns Grit::Tree (unbaked)
Find the named object in this tree‘s contents
Examples
Repo.new('/path/to/grit').tree/'lib' # => #<Grit::Tree "6cc23ee138be09ff8c28b07162720018b244e95e"> Repo.new('/path/to/grit').tree/'README.txt' # => #<Grit::Blob "8b1e02c0fb554eed2ce2ef737a68bb369d7527df">
Returns Grit::Blob or Grit::Tree or nil if not found
Parse a content item and create the appropriate object
+repo+ is the Repo +text+ is the single line containing the items data in `git ls-tree` format
Returns Grit::Blob or Grit::Tree
Initializer for Tree.create
+repo+ is the Repo +atts+ is a Hash of instance variable data
Returns Grit::Tree (unbaked)