◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
10 changes: 5 additions & 5 deletions git/index/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ def iter_blobs(

:param predicate:
Function(t) returning ``True`` if tuple(stage, Blob) should be yielded by
the iterator. A default filter, the `~git.index.typ.BlobFilter`, allows you
to yield blobs only if they match a given list of paths.
"""
for entry in self.entries.values():
Expand Down Expand Up @@ -770,7 +770,7 @@ def add(
- path string

Strings denote a relative or absolute path into the repository pointing
to an existing file, e.g., ``CHANGES``, `lib/myfile.ext``,
``/home/gitrepo/lib/myfile.ext``.

Absolute paths must start with working tree directory of this index's
Expand All @@ -789,7 +789,7 @@ def add(

They are added at stage 0.

- :class:~`git.objects.blob.Blob` or
:class:`~git.objects.submodule.base.Submodule` object

Blobs are added as they are assuming a valid mode is set.
@@ -815,7 +815,7 @@ def add(

- :class:`~git.index.typ.BaseIndexEntry` or type

Handling equals the one of :class:~`git.objects.blob.Blob` objects, but
the stage may be explicitly set. Please note that Index Entries require
binary sha's.

Expand Down Expand Up @@ -998,7 +998,7 @@ def remove(

The path string may include globs, such as ``*.c``.

- :class:~`git.objects.blob.Blob` object

Only the path portion is used in this case.

Expand Down
4 changes: 2 additions & 2 deletions git/objects/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def new(cls, repo: "Repo", id: Union[str, "Reference"]) -> AnyGitObject:
:return:
New :class:`Object` instance of a type appropriate to the object type behind
`id`. The id of the newly created object will be a binsha even though the
input id may have been a `~git.refs.reference.Reference` or rev-spec.

:param id:
:class:`~git.refs.reference.Reference`, rev-spec, or hexsha.
Expand Down Expand Up @@ -218,7 +218,7 @@ class IndexObject(Object):
"""Base for all objects that can be part of the index file.

The classes representing git object types that can be part of the index file are
:class:`~git.objects.tree.Tree and :class:`~git.objects.blob.Blob`. In addition,
:class:`~git.objects.submodule.base.Submodule`, which is not really a git object
type but can be part of an index file, is also a subclass.
"""
Expand Down
4 changes: 2 additions & 2 deletions git/objects/commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def name_rev(self) -> str:
"""
:return:
String describing the commits hex sha based on the closest
`~git.refs.reference.Reference`.

:note:
Mostly useful for UI purposes.
Expand Down Expand Up @@ -349,7 +349,7 @@ def iter_items(
return cls._iter_from_process_or_stream(repo, proc)

def iter_parents(self, paths: Union[PathLike, Sequence[PathLike]] = "", **kwargs: Any) -> Iterator["Commit"]:
R"""Iterate _all_ parents of this commit.

:param paths:
Optional path or list of paths limiting the :class:`Commit`\s to those that
Expand Down
2 changes: 1 addition & 1 deletion git/repo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def create_submodule(self, *args: Any, **kwargs: Any) -> Submodule:
def iter_submodules(self, *args: Any, **kwargs: Any) -> Iterator[Submodule]:
"""An iterator yielding Submodule instances.

See the `~git.objects.util.Traversable` interface for a description of `args`
and `kwargs`.

:return:
Expand Down
Toggle all file notes Toggle all file annotations