Class | Grit::Index |
In: |
lib/grit/index.rb
|
Parent: | Object |
current_tree | [RW] | Public: Gets/Sets the Grit::Tree object representing the tree upon which the next commit will be based. |
repo | [RW] | Public: Gets/Sets the Grit::Repo to which this index belongs. |
tree | [RW] | Public: Gets/Sets the Hash tree map that holds the changes to be made in the next commit. |
Initialize a new Index object.
repo - The Grit::Repo to which the index belongs.
Returns the newly initialized Grit::Index.
Public: Commit the contents of the index
message - The String commit message. parents - Array of String commit SHA1s or Grit::Commit objects to
attach this commit to to form a new head (default: nil).
actor - The Grit::Actor details of the user making the commit
(default: nil).
last_tree - The String SHA1 of a tree to compare with in order to avoid
making empty commits (default: nil).
head - The String branch name to write this head to
(default: "master").
Public: Delete the given file from the index.
path - The String file path including filename (no slash prefix).
Returns nothing.
Recursively write a tree to the index.
tree - The Hash tree map:
key - The String directory or filename. val - The Hash submap or the String contents of the file.
now_tree - The Grit::Tree representing the a previous tree upon which
this tree will be based (default: nil).