A Git Index file.
Method __init__ Open an index file.
Method path Undocumented
Method __repr__ Undocumented
Method write Write current contents of index to disk.
Method read Read current contents of index from disk.
Method __len__ Number of entries in this index file.
Method __getitem__ Retrieve entry by relative path.
Method __iter__ Iterate over the paths in this index.
Method get_sha1 Return the (git object) SHA1 for the object at a path.
Method get_mode Return the POSIX file mode for the object at a path.
Method iterobjects Iterate over path, sha, mode tuples for use with commit_tree.
Method iterblobs Undocumented
Method clear Remove all contents from this index.
Method __setitem__ Undocumented
Method __delitem__ Undocumented
Method iteritems Undocumented
Method items Undocumented
Method update Undocumented
Method changes_from_tree Find the differences between the contents of this index and a tree.
Method commit Create a new tree from an index.
def __init__(self, filename):
Open an index file.
ParametersfilenamePath to the index file
@property
def path(self):
Undocumented
def __repr__(self):
Undocumented
def write(self):
Write current contents of index to disk.
def read(self):
Read current contents of index from disk.
def __len__(self):
Number of entries in this index file.
def __getitem__(self, name):
Retrieve entry by relative path.
Returnstuple with (ctime, mtime, dev, ino, mode, uid, gid, size, sha, flags)
def __iter__(self):
Iterate over the paths in this index.
def get_sha1(self, path):
Return the (git object) SHA1 for the object at a path.
def get_mode(self, path):
Return the POSIX file mode for the object at a path.
def iterobjects(self):
Iterate over path, sha, mode tuples for use with commit_tree.
def iterblobs(self):
Undocumented
def clear(self):
Remove all contents from this index.
def __setitem__(self, name, x):
Undocumented
def __delitem__(self, name):
Undocumented
def iteritems(self):
Undocumented
def items(self):
Undocumented
def update(self, entries):
Undocumented
def changes_from_tree(self, object_store, tree, want_unchanged=False):
Find the differences between the contents of this index and a tree.
Parametersobject_storeObject store to use for retrieving tree contents
treeSHA1 of the root tree
want_unchangedWhether unchanged files should be reported
ReturnsIterator over tuples with (oldpath, newpath), (oldmode, newmode), (oldsha, newsha)
def commit(self, object_store):
Create a new tree from an index.
Parametersobject_storeObject store to save the tree in
ReturnsRoot tree SHA
API Documentation for Dulwich, generated by pydoctor at 2018-11-17 19:05:54.