Merge pull request #1530 from obfusk/fix-unsafe-param-docstring · gitpython-developers/GitPython@1d644d8 · GitHub
Skip to content

Commit 1d644d8

Browse files
authored
Merge pull request #1530 from obfusk/fix-unsafe-param-docstring
fix/add allow_unsafe_* params in docstrings + fix typo
2 parents fbc36f9 + 4110b61 commit 1d644d8

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

git/objects/submodule/base.py

Lines changed: 7 additions & 1 deletion

git/remote.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,7 @@ def set_url(
641641
642642
:param new_url: string being the URL to add as an extra remote URL
643643
:param old_url: when set, replaces this URL with new_url for the remote
644+
:param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
644645
:return: self
645646
"""
646647
if not allow_unsafe_protocols:
@@ -660,6 +661,7 @@ def add_url(self, url: str, allow_unsafe_protocols: bool = False, **kwargs: Any)
660661
multiple URLs for a single remote.
661662
662663
:param url: string being the URL to add as an extra remote URL
664+
:param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
663665
:return: self
664666
"""
665667
return self.set_url(url, add=True, allow_unsafe_protocols=allow_unsafe_protocols)
@@ -760,6 +762,7 @@ def create(cls, repo: "Repo", name: str, url: str, allow_unsafe_protocols: bool
760762
:param repo: Repository instance that is to receive the new remote
761763
:param name: Desired name of the remote
762764
:param url: URL which corresponds to the remote's name
765+
:param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
763766
:param kwargs: Additional arguments to be passed to the git-remote add command
764767
:return: New Remote instance
765768
:raise GitCommandError: in case an origin with that name already exists"""
@@ -978,6 +981,8 @@ def fetch(
978981
:param kill_after_timeout:
979982
To specify a timeout in seconds for the git command, after which the process
980983
should be killed. It is set to None by default.
984+
:param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
985+
:param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack
981986
:param kwargs: Additional arguments to be passed to git-fetch
982987
:return:
983988
IterableList(FetchInfo, ...) list of FetchInfo instances providing detailed
@@ -1027,6 +1032,8 @@ def pull(
10271032
:param refspec: see :meth:`fetch` method
10281033
:param progress: see :meth:`push` method
10291034
:param kill_after_timeout: see :meth:`fetch` method
1035+
:param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
1036+
:param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack
10301037
:param kwargs: Additional arguments to be passed to git-pull
10311038
:return: Please see :meth:`fetch` method"""
10321039
if refspec is None:
@@ -1077,6 +1084,8 @@ def push(
10771084
:param kill_after_timeout:
10781085
To specify a timeout in seconds for the git command, after which the process
10791086
should be killed. It is set to None by default.
1087+
:param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
1088+
:param allow_unsafe_options: Allow unsafe options to be used, like --receive-pack
10801089
:param kwargs: Additional arguments to be passed to git-push
10811090
:return:
10821091
A ``PushInfoList`` object, where each list member

git/repo/base.py

Lines changed: 4 additions & 2 deletions

0 commit comments

Comments
 (0)