summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2023-01-08 07:57:40 +0100
committerGitHub <noreply@github.com>2023-01-08 07:57:40 +0100
commit1d644d8f76a4b7e63685a4903522a3720d271403 (patch)
tree2855e52bccf29ce3e67bde9abebf15ac42d1bb90
parentfbc36f9cefa3a7e150187dabf8758a53062c5b47 (diff)
parent4110b613833fb4039847ac80ca8571f4ec8ebe50 (diff)
downloadgitpython-1d644d8f76a4b7e63685a4903522a3720d271403.tar.gz
Merge pull request #1530 from obfusk/fix-unsafe-param-docstring
fix/add allow_unsafe_* params in docstrings + fix typo
-rw-r--r--git/objects/submodule/base.py8
-rw-r--r--git/remote.py9
-rw-r--r--git/repo/base.py6
3 files changed, 20 insertions, 3 deletions
diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py
index 9aa9deb2..7db64d70 100644
--- a/git/objects/submodule/base.py
+++ b/git/objects/submodule/base.py
@@ -287,7 +287,9 @@ class Submodule(IndexObject, TraversableIterableObj):
:param url: url to clone from
:param path: repository - relative path to the submodule checkout location
:param name: canonical of the submodule
- :param kwrags: additinoal arguments given to git.clone"""
+ :param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
+ :param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack
+ :param kwargs: additional arguments given to git.clone"""
module_abspath = cls._module_abspath(repo, path, name)
module_checkout_path = module_abspath
if cls._need_gitfile_submodules(repo.git):
@@ -411,6 +413,8 @@ class Submodule(IndexObject, TraversableIterableObj):
as its value.
:param clone_multi_options: A list of Clone options. Please see ``git.repo.base.Repo.clone``
for details.
+ :param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
+ :param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack
:return: The newly created submodule instance
:note: works atomically, such that no change will be done if the repository
update fails for instance"""
@@ -581,6 +585,8 @@ class Submodule(IndexObject, TraversableIterableObj):
as its value.
:param clone_multi_options: list of Clone options. Please see ``git.repo.base.Repo.clone``
for details. Only take effect with `init` option.
+ :param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
+ :param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack
:note: does nothing in bare repositories
:note: method is definitely not atomic if recurisve is True
:return: self"""
diff --git a/git/remote.py b/git/remote.py
index 3f86a297..5886a69f 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -641,6 +641,7 @@ class Remote(LazyMixin, IterableObj):
:param new_url: string being the URL to add as an extra remote URL
:param old_url: when set, replaces this URL with new_url for the remote
+ :param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
:return: self
"""
if not allow_unsafe_protocols:
@@ -660,6 +661,7 @@ class Remote(LazyMixin, IterableObj):
multiple URLs for a single remote.
:param url: string being the URL to add as an extra remote URL
+ :param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
:return: self
"""
return self.set_url(url, add=True, allow_unsafe_protocols=allow_unsafe_protocols)
@@ -760,6 +762,7 @@ class Remote(LazyMixin, IterableObj):
:param repo: Repository instance that is to receive the new remote
:param name: Desired name of the remote
:param url: URL which corresponds to the remote's name
+ :param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
:param kwargs: Additional arguments to be passed to the git-remote add command
:return: New Remote instance
:raise GitCommandError: in case an origin with that name already exists"""
@@ -978,6 +981,8 @@ class Remote(LazyMixin, IterableObj):
:param kill_after_timeout:
To specify a timeout in seconds for the git command, after which the process
should be killed. It is set to None by default.
+ :param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
+ :param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack
:param kwargs: Additional arguments to be passed to git-fetch
:return:
IterableList(FetchInfo, ...) list of FetchInfo instances providing detailed
@@ -1027,6 +1032,8 @@ class Remote(LazyMixin, IterableObj):
:param refspec: see :meth:`fetch` method
:param progress: see :meth:`push` method
:param kill_after_timeout: see :meth:`fetch` method
+ :param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
+ :param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack
:param kwargs: Additional arguments to be passed to git-pull
:return: Please see :meth:`fetch` method"""
if refspec is None:
@@ -1077,6 +1084,8 @@ class Remote(LazyMixin, IterableObj):
:param kill_after_timeout:
To specify a timeout in seconds for the git command, after which the process
should be killed. It is set to None by default.
+ :param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
+ :param allow_unsafe_options: Allow unsafe options to be used, like --receive-pack
:param kwargs: Additional arguments to be passed to git-push
:return:
A ``PushInfoList`` object, where each list member
diff --git a/git/repo/base.py b/git/repo/base.py
index 93ed0c71..4a3704c0 100644
--- a/git/repo/base.py
+++ b/git/repo/base.py
@@ -1259,7 +1259,8 @@ class Repo(object):
option per list item which is passed exactly as specified to clone.
For example ['--config core.filemode=false', '--config core.ignorecase',
'--recurse-submodule=repo1_path', '--recurse-submodule=repo2_path']
- :param unsafe_protocols: Allow unsafe protocols to be used, like ext
+ :param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
+ :param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack
:param kwargs:
* odbt = ObjectDatabase Type, allowing to determine the object database
implementation used by the returned Repo instance
@@ -1302,7 +1303,8 @@ class Repo(object):
If you want to unset some variable, consider providing empty string
as its value.
:param multi_options: See ``clone`` method
- :param unsafe_protocols: Allow unsafe protocols to be used, like ext
+ :param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
+ :param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack
:param kwargs: see the ``clone`` method
:return: Repo instance pointing to the cloned directory"""
git = cls.GitCommandWrapperType(os.getcwd())