Python bindings for libgit2.
Bases: pygit2.Object
Blob objects
raw data
Bases: pygit2.Object
Commit objects
author
commit time
commit time offset
committer
message
message encoding
parents of this commit
tree object
Bases: object
Index file
Add or update an index entry from a file in disk.
Clear the contents (all the entries) of an index object.
Update the contents of an existing index object in memory by reading from the hard disk.
Update the index file from the given tree object.
Write an existing index object from memory back to disk using an atomic file lock.
Create a tree object from the index file, return its oid.
Bases: object
Index entry
hex oid
mode
object id
path
Bases: object
Object objects
hex oid
object id
Read the raw contents of the object from the repo.
type number
Bases: object
Reference
Delete this reference. It will no longer be valid!
hex oid
The full name of a reference.
object id
Reload the reference from the file-system.
Rename the reference.
Resolve a symbolic reference and return a direct reference.
target
type (GIT_REF_OID, GIT_REF_SYMBOLIC or GIT_REF_PACKED).
Bases: object
Git repository
Create a TreeBuilder object for this repository.
Create a new blob from memory
Create a new commit object, return its SHA.
Create a new reference “name” that points to the object given by its “sha”.
Create a new symbolic reference “name” that points to the reference “target”.
Create a new tag object, return its SHA.
index file.
Return a list with all the references in the repository.
Lookup a reference by its name in a repository.
Pack all the loose references in the repository.
The normalized path to the git repository.
Read raw object data from the repository.
Reads the status of the repository and returns a dictionary with file paths as keys and status flags as values. See pygit2.GIT_STATUS_*.
Returns the status of the given file path.
Generator that traverses the history starting from the given commit.
The normalized path to the working directory of the repository. If the repository is bare, None will be returned.
Write raw object data into the repository. First arg is the object type, the second one a buffer with data. Return the object id (sha) of the created object.
Bases: pygit2.Object
Tag objects
tag message
tag name
tagger
tagged object
Bases: pygit2.Object
Tree objects
Bases: object
TreeEntry objects
attributes
hex oid
name
object id
Look up the corresponding object in the repo.
Look for a git repository and return its path.
Creates a new Git repository in the given folder.