|
|
_check_bare(self)
Check whether this is a bare repository |
|
|
|
|
__init__(self,
path)
x.__init__(...) initializes x; see help(type(x)) for signature |
|
|
|
|
__build_env(self,
extra_env)
Prepare environment for subprocess calls |
|
|
tuple
|
__git_getoutput(self,
command,
args=[],
extra_env=None,
cwd=None)
Run a git command and return the output |
|
|
tuple
|
__git_inout(self,
command,
args,
input,
extra_env=None)
Run a git command with input and return output |
|
|
|
|
_git_command(self,
command,
args=[],
extra_env=None)
Execute git command with arguments args and environment env at path. |
|
|
|
|
force_head(self,
commit,
hard=False)
Force HEAD to a specific commit |
|
|
tuple
|
is_clean(self)
Does the repository contain any uncommitted modifications? |
|
|
bool
|
|
str
|
rev_parse(self,
name)
Find the SHA1 of a given name |
|
|
str
|
get_config(self,
name)
Gets the config value associated with name |
|
|
|
GitModifier
|
get_author_info(self)
Determine a sane values for author name and author email from git's
config and environment variables. |
|
|
|
|
| archive(self,
format,
prefix,
output,
treeish,
**kwargs) |
|
|
|
|
collect_garbage(self,
auto=False)
Cleanup unnecessary files and optimize the local repository |
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|
|
|
|
|
|
|
str
|
get_branch(self)
On what branch is the current working copy |
|
|
bool
|
has_branch(self,
branch,
remote=False)
Check if the repository has branch named branch. |
|
|
|
|
|
str
|
|
|
|
merge(self,
commit,
verbose=False)
Merge changes from the named commit into the current branch |
|
|
tuple
|
is_fast_forward(self,
from_branch,
to_branch)
Check if an update from from_branch to to_branch would
be a fast forward or if the branch is up to date already. |
|
|
list
|
|
list
|
|
list
|
|
|
|
update_ref(self,
ref,
new,
old=None,
msg=None)
Update ref ref to commit new if ref currently
points to old |
|
|
|
|
create_tag(self,
name,
msg=None,
commit=None,
sign=False,
keyid=None)
Create a new tag. |
|
|
|
|
|
|
|
|
bool
|
has_tag(self,
tag)
Check if the repository has a tag named tag. |
|
|
|
|
_build_legacy_tag(self,
format,
version)
legacy version numbering |
|
|
|
|
find_version(self,
format,
version)
Check if a certain version is stored in this repo. |
|
|
str
|
find_tag(self,
commit,
pattern=None)
Find the closest tag to a given commit |
|
|
list of str
|
|
|
|
checkout(self,
treeish)
Checkout treeish |
|
|
bool
|
has_treeish(self,
treeish)
Check if the repository has the treeish object treeish. |
|
|
str
|
write_tree(self,
index_file=None)
Create a tree object from the current index |
|
|
list of str
|
|
bool
|
|
|
|
add_remote_repo(self,
name,
url,
tags=True,
fetch=False)
Add a tracked remote repository |
|
|
|
|
fetch(self,
repo=None)
Download objects and refs from another repository. |
|
|
|
|
pull(self,
repo=None,
ff_only=False)
Fetch and merge from another repository |
|
|
|
|
add_files(self,
paths,
force=False,
index_file=None,
work_tree=None)
Add files to a the repository |
|
|
|
|
remove_files(self,
paths,
verbose=False)
Remove files from the repository |
|
|
list of str
|
list_files(self,
types=['cached'])
List files in index and working tree |
|
|
|
|
_commit(self,
msg,
args=[],
author_info=None) |
|
|
|
|
commit_staged(self,
msg,
author_info=None)
Commit currently staged files to the repository |
|
|
|
|
commit_all(self,
msg,
author_info=None)
Commit all changes to the repository |
|
|
|
|
commit_files(self,
files,
msg,
author_info=None)
Commit the given files to the repository |
|
|
|
|
commit_dir(self,
unpack_dir,
msg,
branch,
other_parents=None,
author={},
committer={})
Replace the current tip of branch branch with the contents
from unpack_dir |
|
|
|
|
commit_tree(self,
tree,
msg,
parents,
author={},
committer={})
Commit a tree with commit msg msg and parents parents |
|
|
|
|
get_commits(self,
since=None,
until=None,
paths=None,
options=None,
first_parent=False)
Get commits from since to until touching paths |
|
|
|
|
show(self,
id)
git-show id |
|
|
|
|
| grep_log(self,
regex,
where=None) |
|
|
str
|
get_subject(self,
commit)
Gets the subject of a commit. |
|
|
|
dict
|
|
|
|
format_patches(self,
start,
end,
output_dir,
signature=True)
Output the commits between start and end as patches in output_dir |
|
|
|
|
apply_patch(self,
patch,
index=True,
context=None,
strip=None)
Apply a patch using git apply |
|
|
bool
|
|
|
|
|
|
|
update_submodules(self,
init=True,
recursive=True,
fetch=False)
Update all submodules |
|
|
|
list of tuples
|
get_submodules(self,
treeish,
path=None,
recursive=True)
List the submodules of treeish |
|
|