Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1d644d8

Browse files
authored
Merge pull request#1530 from obfusk/fix-unsafe-param-docstring
fix/add allow_unsafe_* params in docstrings + fix typo
2 parentsfbc36f9 +4110b61 commit1d644d8

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

‎git/objects/submodule/base.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ def _clone_repo(
287287
:param url: url to clone from
288288
:param path: repository - relative path to the submodule checkout location
289289
:param name: canonical of the submodule
290-
:param kwrags: additinoal arguments given to git.clone"""
290+
:param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
291+
:param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack
292+
:param kwargs: additional arguments given to git.clone"""
291293
module_abspath=cls._module_abspath(repo,path,name)
292294
module_checkout_path=module_abspath
293295
ifcls._need_gitfile_submodules(repo.git):
@@ -411,6 +413,8 @@ def add(
411413
as its value.
412414
:param clone_multi_options: A list of Clone options. Please see ``git.repo.base.Repo.clone``
413415
for details.
416+
:param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
417+
:param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack
414418
:return: The newly created submodule instance
415419
:note: works atomically, such that no change will be done if the repository
416420
update fails for instance"""
@@ -581,6 +585,8 @@ def update(
581585
as its value.
582586
:param clone_multi_options: list of Clone options. Please see ``git.repo.base.Repo.clone``
583587
for details. Only take effect with `init` option.
588+
:param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
589+
:param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack
584590
:note: does nothing in bare repositories
585591
:note: method is definitely not atomic if recurisve is True
586592
:return: self"""

‎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
ifnotallow_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
returnself.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
ifrefspecisNone:
@@ -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
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,8 @@ def clone(
12591259
option per list item which is passed exactly as specified to clone.
12601260
For example ['--config core.filemode=false', '--config core.ignorecase',
12611261
'--recurse-submodule=repo1_path', '--recurse-submodule=repo2_path']
1262-
:param unsafe_protocols: Allow unsafe protocols to be used, like ext
1262+
:param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
1263+
:param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack
12631264
:param kwargs:
12641265
* odbt = ObjectDatabase Type, allowing to determine the object database
12651266
implementation used by the returned Repo instance
@@ -1302,7 +1303,8 @@ def clone_from(
13021303
If you want to unset some variable, consider providing empty string
13031304
as its value.
13041305
:param multi_options: See ``clone`` method
1305-
:param unsafe_protocols: Allow unsafe protocols to be used, like ext
1306+
:param allow_unsafe_protocols: Allow unsafe protocols to be used, like ext
1307+
:param allow_unsafe_options: Allow unsafe options to be used, like --upload-pack
13061308
:param kwargs: see the ``clone`` method
13071309
:return: Repo instance pointing to the cloned directory"""
13081310
git=cls.GitCommandWrapperType(os.getcwd())

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp