class documentation
class Index(object):
A Git Index file.
Method | __delitem__ |
Undocumented |
Method | __getitem__ |
Retrieve entry by relative path. |
Method | __init__ |
Create an index object associated with the given filename. |
Method | __iter__ |
Iterate over the paths in this index. |
Method | __len__ |
Number of entries in this index file. |
Method | __repr__ |
Undocumented |
Method | __setitem__ |
Undocumented |
Method | changes |
Find the differences between the contents of this index and a tree. |
Method | clear |
Remove all contents from this index. |
Method | commit |
Create a new tree from an index. |
Method | get |
Return the POSIX file mode for the object at a path. |
Method | get |
Return the (git object) SHA1 for the object at a path. |
Method | items |
Undocumented |
Method | iteritems |
Undocumented |
Method | iterobjects |
Iterate over path, sha, mode tuples for use with commit_tree. |
Method | read |
Read current contents of index from disk. |
Method | update |
Undocumented |
Method | write |
Write current contents of index to disk. |
Property | path |
Undocumented |
Instance Variable | _byname |
Undocumented |
Instance Variable | _filename |
Undocumented |
Instance Variable | _version |
Undocumented |
Retrieve entry by relative path.
- Returns: tuple with (ctime, mtime, dev, ino, mode, uid, gid, size, sha,
- flags)
Parameters | |
name:bytes | Undocumented |
Returns | |
IndexEntry | Undocumented |
Find the differences between the contents of this index and a tree.
- Returns: Iterator over tuples with (oldpath, newpath), (oldmode,
- newmode), (oldsha, newsha)
Parameters | |
object | Object store to use for retrieving tree contents |
tree:ObjectID | SHA1 of the root tree |
wantbool | Whether unchanged files should be reported |
Create a new tree from an index.
Parameters | |
object | Object store to save the tree in |
Returns | |
Root tree SHA |