Add data to a git repository using git fast-import

Class Variable m_regular Undocumented
Class Variable m_exec Undocumented
Class Variable m_symlink Undocumented
Method __init__
Method add_file Add a file
Method add_symlink Add a symlink
Method start_commit Start a fast import commit
Method deleteall Issue deleteall to fastimport so we start from a empty tree
Method close Close fast-import issuing all pending actions
Method __del__ Undocumented
Class Variable _bufsize Undocumented
Instance Variable _repo Undocumented
Instance Variable _fi Undocumented
Instance Variable _out Undocumented
Method _do_data Undocumented
Method _do_file Undocumented
_bufsize =
Undocumented
(type: int)
m_regular =
Undocumented
(type: int)
m_exec =
Undocumented
(type: int)
m_symlink =
Undocumented
(type: int)
def __init__(self, repo):
Parametersrepothe git repository FastImport acts on (type: GitRepository)
_repo =
Undocumented
_fi =
Undocumented
_out =
Undocumented
def _do_data(self, fd, size):
Undocumented
def _do_file(self, filename, mode, fd, size):
Undocumented
def add_file(self, filename, fd, size, mode=m_regular):

Add a file

Parametersfilenamethe name of the file to add (type: str)
fdstream to read data from (type: File like object)
sizesize of the file to add (type: int)
modefile mode, default is FastImport.m_regular. (type: int)
def add_symlink(self, linkname, linktarget):

Add a symlink

Parameterslinknamethe symbolic link's name
linknamestr
linktargetthe target the symlink points to (type: str)
def start_commit(self, branch, committer, msg):

Start a fast import commit

Parametersbranchbranch to commit on (type: str)
committerthe committer information (type: GitModifier)
msgthe commit message (type: str)
def deleteall(self):

Issue deleteall to fastimport so we start from a empty tree

def close(self):

Close fast-import issuing all pending actions

def __del__(self):
Undocumented
API Documentation for git-buildpackage, generated by pydoctor at 2021-02-01 08:15:22.