Class Grit::Index
In: lib/grit/index.rb
Parent: Object

Methods

add   commit   new   read_tree   write_blob   write_tree  

Attributes

current_tree  [RW] 
repo  [RW] 
tree  [RW] 

Public Class methods

Public Instance methods

Add a file to the index

  +path+ is the path (including filename)
  +data+ is the binary contents of the file

Returns nothing

Commit the contents of the index

  +message+ is the commit message [nil]
  +parents+ is one or more commits to attach this commit to to form a new head [nil]
  +actor+ is the details of the user making the commit [nil]
  +last_tree+ is a tree to compare with - to avoid making empty commits [nil]
  +head+ is the branch to write this head to [master]

Returns a String of the SHA1 of the commit

Sets the current tree

  +tree+ the branch/tag/sha... to use - a string

Returns index (self)

Write the blob to the index

  +data+ is the data to write

Returns the SHA1 String of the blob

Recursively write a tree to the index

  +tree+ is the tree

Returns the SHA1 String of the tree

[Validate]