GitPython の API リファレンス
GitPython (gitpython-developers/GitPython) の公開 API 127 件 —— クラス 36、関数 27、メソッド 64。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。
リポジトリ: gitpython-developers/GitPython
| 種別 | 件数 |
|---|---|
| クラス | 36 |
| 関数 | 27 |
| メソッド | 64 |
API 一覧
func
fuzzing.fuzz-targets.utils.handle_exception(e:Exception) -> intEncapsulate exception handling logic for reusability.
func
fuzzing.fuzz-targets.utils.read_lines_from_file(file_path:str) -> listRead lines from a file and return them as a list.
func
fuzzing.fuzz-targets.utils.setup_git_environment() -> NoneSet up the environment variables for Git.
class
git.cmd.GitThe Git class manages communication with the Git binary.
method
git.cmd.Git.check_unsafe_protocols(url:str) -> NoneCheck for unsafe protocols.
method
git.cmd.Git.clear_cache() -> 'Git'Clear all kinds of internal caches to release resources.
func
git.cmd.Git.kill_process(pid:int) -> NoneCallback to kill a process.
method
git.cmd.Git.update_environment(**kwargs:Any) -> Dict[str, Union[str, None]]Set environment variables for future git invocations.
method
git.cmd.Git.working_dir() -> Union[None, PathLike]:return: Git directory we are working on
class
git.diff.DiffA Diff contains diff information between two Trees.
method
git.diff.Diff.renamed() -> boolDeprecated, use :attr:`renamed_file` instead.
class
git.diff.DiffConstantsSpecial objects for :meth:`Diffable.diff`.
class
git.exc.GitErrorBase class for all package exceptions.
class
git.exc.HookExecutionErrorThrown if a hook exits with a non-zero exit code.
class
git.exc.NoSuchPathErrorThrown if a path could not be access by the system.
class
git.exc.WorkTreeRepositoryUnsupportedThrown to indicate we can't handle work tree repositories.
func
git.index.fun.read_cache(stream:IO[bytes]) -> Tuple[int, Dict[Tuple[PathLike, int], 'IndexEntry'], bytes, bytes]Read a cache file from the given stream.
func
git.index.fun.read_header(stream:IO[bytes]) -> Tuple[int, int]Return tuple(version_long, num_entries) from the given stream.
func
git.index.fun.run_commit_hook(name:str, index:'IndexFile', *args:str) -> NoneRun the commit hook of the given name.
method
git.index.typ.IndexEntry.from_blob(blob:Blob, stage:int=0) -> 'IndexEntry':return: Minimal entry resembling the given blob object
class
git.objects.base.IndexObjectBase for all objects that can be part of the index file.
class
git.objects.base.ObjectBase class for classes representing git object types.
method
git.objects.base.Object.hexsha() -> str:return: 40 byte hex version of our 20 byte binary sha
method
git.objects.base.Object.stream_data(ostream:'OStream') -> 'Object'Write our data directly to the given output stream.
class
git.objects.blob.BlobA Blob encapsulates a git blob object.
class
git.objects.commit.CommitWraps a git commit object.
method
git.objects.commit.Commit.iter_parents(paths:Union[PathLike, Sequence[PathLike]]='', **kwargs:Any) -> Iterator['Commit']Iterate *all* parents of this commit.
method
git.objects.commit.Commit.replace(**kwargs:Any) -> 'Commit'Create new commit object from an existing commit object.
method
git.objects.commit.Commit.summary() -> Union[str, bytes]:return: First line of the commit message
method
git.objects.commit.Commit.trailers() -> Dict[str, str]Deprecated.
method
git.objects.commit.Commit.trailers_dict() -> Dict[str, List[str]]Get the trailers of the message as a dictionary.
method
git.objects.commit.Commit.trailers_list() -> List[Tuple[str, str]]Get the trailers of the message as a list.
class
git.objects.submodule.base.SubmoduleImplements access to a git submodule.
method
git.objects.submodule.base.Submodule.deinit(force:bool=False) -> 'Submodule'Run ``git submodule deinit`` on this submodule.
method
git.objects.submodule.base.Submodule.move(module_path:PathLike, configuration:bool=True, module:bool=True) -> 'Submodule'Move the submodule to a another module path.
method
git.objects.submodule.base.Submodule.name() -> str:return: The name of this submodule.
method
git.objects.submodule.base.Submodule.remove(module:bool=True, force:bool=False, configuration:bool=True, dry_run:bool=False) -> 'Submodule'Remove this submodule from the repository.
method
git.objects.submodule.base.Submodule.rename(new_name:str) -> 'Submodule'Rename this submodule.
func
git.objects.submodule.util.mkhead(repo:'Repo', path:PathLike) -> 'Head':return: New branch/head instance
func
git.objects.submodule.util.sm_name(section:str) -> str:return: Name of the submodule as parsed from the section name
func
git.objects.submodule.util.sm_section(name:str) -> str:return: Section title used in ``.gitmodules`` configuration file
class
git.objects.tag.TagObjectAnnotated (i.e.
method
git.objects.tree.Tree.join(file:PathLike) -> IndexObjUnionFind the named object in this tree's contents.
func
git.objects.util.altz_to_utctz_str(altz:float) -> strConvert a timezone offset west of UTC in seconds into a Git timezone offset string.
func
git.objects.util.verify_utctz(offset:str) -> str:raise ValueError: If `offset` is incorrect.
func
git.refresh(path:Optional[PathLike]=None) -> NoneConvenience method for setting the git executable path.
class
git.refs.head.HeadA Head is a named reference to a :class:`~git.objects.commit.Commit`.
method
git.refs.head.Head.delete(repo:'Repo', *force:bool=False, *heads:'Union[Head, str]', **kwargs:Any) -> NoneDelete the given heads.
method
git.refs.head.Head.rename(new_path:PathLike, force:bool=False) -> 'Head'Rename self to a new path.
class
git.refs.log.RefLogEntryNamed tuple allowing easy access to the revlog data fields.
method
git.refs.log.RefLogEntry.actor() -> ActorActor instance, providing access.
method
git.refs.log.RefLogEntry.format() -> str:return: A string suitable to be placed in a reflog file.
method
git.refs.log.RefLogEntry.new(oldhexsha:str, newhexsha:str, actor:Actor, time:int, tz_offset:int, message:str) -> 'RefLogEntry':return: New instance of a :class:`RefLogEntry`
class
git.refs.reference.ReferenceA named reference to any object.
method
git.refs.reference.Reference.remote_head() -> str:return: Name of the remote head itself, e.g.
class
git.refs.remote.RemoteReferenceA reference pointing to a remote head.
method
git.refs.remote.RemoteReference.create(*args:Any, **kwargs:Any) -> NoReturnRaise :exc:`TypeError`.
method
git.refs.remote.RemoteReference.delete(repo:'Repo', *refs:'RemoteReference', **kwargs:Any) -> NoneDelete the given remote references.
class
git.refs.symbolic.SymbolicReferenceSpecial case of a reference that is symbolic.
method
git.refs.symbolic.SymbolicReference.commit() -> 'Commit'Query or set commits directly
method
git.refs.symbolic.SymbolicReference.delete(repo:'Repo', path:PathLike) -> NoneDelete the reference at the given path.
method
git.refs.symbolic.SymbolicReference.from_path(repo:'Repo', path:PathLike) -> T_ReferencesMake a symbolic reference from a path.
method
git.refs.symbolic.SymbolicReference.iter_items(repo:'Repo', common_path:Union[PathLike, None]=None, *args:Any, **kwargs:Any) -> Iterator[T_References]Find all refs in the repository.
method
git.refs.symbolic.SymbolicReference.log_append(oldbinsha:bytes, message:Union[str, None], newbinsha:Union[bytes, None]=None) -> 'RefLogEntry'Append a logentry to the logfile of this ref.
method
git.refs.symbolic.SymbolicReference.object() -> AnyGitObjectReturn the object our ref currently refers to
method
git.refs.symbolic.SymbolicReference.rename(new_path:PathLike, force:bool=False) -> 'SymbolicReference'Rename self to a new path.
method
git.refs.symbolic.SymbolicReference.set_reference(ref:Union[AnyGitObject, 'SymbolicReference', str], logmsg:Union[str, None]=None) -> 'SymbolicReference'Set ourselves to the given `ref`.
method
git.refs.tag.TagReference.delete(repo:'Repo', *tags:'TagReference') -> NoneDelete the given existing tag or tags.
method
git.remote.FetchInfo.commit() -> 'Commit':return: Commit of our remote ref
method
git.remote.FetchInfo.name() -> str:return: Name of our remote ref
method
git.remote.PushInfoList.raise_if_error() -> NoneRaise an exception if any ref failed to push.
class
git.remote.RemoteProvides easy read and write access to a git remote.
method
git.remote.Remote.create(repo:'Repo', name:str, url:str, allow_unsafe_protocols:bool=False, **kwargs:Any) -> 'Remote'Create a new remote to the given repository.
method
git.remote.Remote.exists() -> bool:return: ``True`` if this is a valid, existing remote.
method
git.remote.Remote.remove(repo:'Repo', name:str) -> strRemove the remote with the given name.
method
git.remote.Remote.rename(new_name:str) -> 'Remote'Rename self to the given `new_name`.
method
git.remote.Remote.rm(repo:'Repo', name:str) -> strAlias of remove.
method
git.remote.Remote.set_url(new_url:str, old_url:Optional[str]=None, allow_unsafe_protocols:bool=False, **kwargs:Any) -> 'Remote'Configure URLs on current remote (cf.
method
git.repo.base.Repo.active_branch() -> HeadThe name of the currently active branch.
method
git.repo.base.Repo.bare() -> bool:return: ``True`` if the repository is bare
method
git.repo.base.Repo.branches() -> 'IterableList[Head]'Alias for heads.
method
git.repo.base.Repo.create_head(path:PathLike, commit:Union['SymbolicReference', 'str']='HEAD', force:bool=False, logmsg:Optional[str]=None) -> 'Head'Create a new head within the repository.
method
git.repo.base.Repo.create_remote(name:str, url:str, **kwargs:Any) -> RemoteCreate a new remote.
method
git.repo.base.Repo.create_submodule(*args:Any, **kwargs:Any) -> SubmoduleCreate a new submodule.
method
git.repo.base.Repo.create_tag(path:PathLike, ref:Union[str, 'SymbolicReference']='HEAD', message:Optional[str]=None, force:bool=False, **kwargs:Any) -> TagReferenceCreate a new tag reference.
method
git.repo.base.Repo.daemon_export() -> boolIf True, git-daemon may export this repository
method
git.repo.base.Repo.delete_head(*heads:'Union[str, Head]', **kwargs:Any) -> NoneDelete the given heads.
method
git.repo.base.Repo.delete_remote(remote:'Remote') -> strDelete the given remote.
method
git.repo.base.Repo.delete_tag(*tags:TagReference) -> NoneDelete the given tag references.
method
git.repo.base.Repo.description() -> strThe project's description
method
git.repo.base.Repo.ignored(*paths:PathLike) -> List[str]Checks if paths are ignored via ``.gitignore``.
method
git.repo.base.Repo.is_ancestor(ancestor_rev:Commit, rev:Commit) -> boolCheck if a commit is an ancestor of another.
method
git.repo.base.Repo.iter_submodules(*args:Any, **kwargs:Any) -> Iterator[Submodule]An iterator yielding Submodule instances.
method
git.repo.base.Repo.refs() -> 'IterableList[Reference]'Alias for references.
func
git.repo.fun.deref_tag(tag:'Tag') -> AnyGitObjectRecursively dereference a tag and return the resulting object.
func
git.repo.fun.find_submodule_git_dir(d:PathLike) -> Optional[PathLike]Search for a submodule repo.
func
git.repo.fun.find_worktree_git_dir(dotgit:PathLike) -> Optional[str]Search for a gitdir for this worktree.
func
git.repo.fun.is_git_dir(d:PathLike) -> boolThis is taken from the git setup.c:is_git_directory function.
func
git.repo.fun.rev_parse(repo:'Repo', rev:str) -> AnyGitObjectParse a revision string.
func
git.repo.fun.to_commit(obj:Object) -> 'Commit'Convert the given object to a commit if possible and return it.
class
git.types.Total_TDDictionary with total stats from any number of files.
class
git.util.IterableDeprecated, use :class:`IterableObj` instead.
method
git.util.Iterable.iter_items(repo:'Repo', *args:Any, **kwargs:Any) -> AnyDeprecated, use :class:`IterableObj` instead.
method
git.util.Iterable.list_items(repo:'Repo', *args:Any, **kwargs:Any) -> AnyDeprecated, use :class:`IterableObj` instead.
func
git.util.assure_directory_exists(path:PathLike, is_file:bool=False) -> boolMake sure that the directory pointed to by path exists.
func
git.util.cwd(new_dir:PathLike) -> Generator[PathLike, None, None]Context manager to temporarily change directory.
func
git.util.handler(function:Callable[[str], Any], path:str, _excinfo:Any) -> NoneCallback for :func:`shutil.rmtree`.
func
git.util.patch_env(name:str, value:str) -> Generator[None, None, None]Context manager to temporarily patch an environment variable.
func
git.util.py_where(program:str, path:Optional[PathLike]=None) -> List[str]Perform a path search to assist :func:`is_cygwin_git`.
func
git.util.rmtree(path:PathLike) -> NoneRemove the given directory tree recursively.
class
gitdb.gitdb.base.IStreamRepresents an input content stream to be fed into the ODB.
class
gitdb.gitdb.base.InvalidOStreamCarries information about an invalid ODB stream
class
gitdb.gitdb.base.ODeltaStreamUses size info of its stream, delaying reads
class
gitdb.gitdb.db.base.CachingDBA database which uses caches to speed-up access
class
gitdb.gitdb.db.base.CompoundDBA database which delegates calls to sub-databases.
class
gitdb.gitdb.db.base.ObjectDBRDefines an interface for object database lookup.
class
gitdb.gitdb.db.base.ObjectDBWDefines an interface to create objects in the database
class
gitdb.gitdb.db.loose.LooseObjectDBA database which operates on loose object files
class
gitdb.gitdb.db.pack.PackedDBA database operating on a set of object packs
class
gitdb.gitdb.db.ref.ReferenceDBA database consisting of database referred to in a file
class
gitdb.gitdb.exc.BadNameA name provided to rev_parse wasn't understood
class
gitdb.gitdb.exc.BadObjectThe object with the given SHA does not exist.
class
gitdb.gitdb.exc.BadObjectTypeThe object had an unsupported type
class
gitdb.gitdb.exc.ODBErrorAll errors thrown by the object database
class
gitdb.gitdb.fun.DeltaChunkListList with special functionality to deal with DeltaChunks.
func
gitdb.gitdb.util.to_hex_sha(sha):return: hexified version of sha
func
smmap.smmap.util.is_64_bit():return: True if the system is 64 bit.
この情報について
掲載しているシグネチャは gitpython-developers/GitPython の公開ソースコードを
Python の ast モジュールで静的解析し、引数名・デフォルト値・
型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。
詳しくは仕組みの解説をご覧ください。