Skip to content

Commit

Permalink
Revise Repo.archive docstring
Browse files Browse the repository at this point in the history
I had missed this in b2b6f7c.
  • Loading branch information
EliahKagan committed Feb 28, 2024
1 parent 0231b74 commit 8344f44
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions git/repo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1535,22 +1535,29 @@ def archive(
) -> Repo:
"""Archive the tree at the given revision.
:param ostream: file compatible stream object to which the archive will be written as bytes.
:param ostream:
File-compatible stream object to which the archive will be written as bytes.
:param treeish: is the treeish name/id, defaults to active branch.
:param treeish:
The treeish name/id, defaults to active branch.
:param prefix: is the optional prefix to prepend to each filename in the archive.
:param prefix:
The optional prefix to prepend to each filename in the archive.
:param kwargs: Additional arguments passed to git-archive:
:param kwargs:
Additional arguments passed to ``git archive``:
* Use the 'format' argument to define the kind of format. Use
specialized ostreams to write any format supported by python.
* You may specify the special **path** keyword, which may either be a repository-relative
path to a directory or file to place into the archive, or a list or tuple of multiple paths.
* Use the 'format' argument to define the kind of format. Use specialized
ostreams to write any format supported by Python.
* You may specify the special **path** keyword, which may either be a
repository-relative path to a directory or file to place into the archive,
or a list or tuple of multiple paths.
:raise GitCommandError: If something went wrong.
:raise GitCommandError:
If something went wrong.
:return: self
:return:
self
"""
if treeish is None:
treeish = self.head.commit
Expand Down

0 comments on commit 8344f44

Please sign in to comment.