From 5b27339b0d7da97743256e871757d54bf5159bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Ne=C4=8Das?= Date: Tue, 23 Jul 2019 12:43:24 +0200 Subject: [PATCH 01/13] Fix Git.transform_kwarg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Kwargs were not transformed correctly if a value was set to 0 due to wrong if condition. Signed-off-by: František Nečas --- git/cmd.py | 2 +- git/test/test_git.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/git/cmd.py b/git/cmd.py index 64c3d480a..50b1e3212 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -893,7 +893,7 @@ def transform_kwarg(self, name, value, split_single_char_options): else: if value is True: return ["--%s" % dashify(name)] - elif value not in (False, None): + elif value is not False and value is not None: return ["--%s=%s" % (dashify(name), value)] return [] diff --git a/git/test/test_git.py b/git/test/test_git.py index 30a6a335e..4a189267e 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -86,6 +86,7 @@ def test_it_transforms_kwargs_into_git_command_arguments(self): assert_equal(["--max-count"], self.git.transform_kwargs(**{'max_count': True})) assert_equal(["--max-count=5"], self.git.transform_kwargs(**{'max_count': 5})) + assert_equal(["--max-count=0"], self.git.transform_kwargs(**{'max_count': 0})) assert_equal([], self.git.transform_kwargs(**{'max_count': None})) # Multiple args are supported by using lists/tuples From a34d515d181f095c477ab35ccae00412219fad42 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 14 Aug 2019 18:05:55 +0800 Subject: [PATCH 02/13] Bump version --- VERSION | 2 +- doc/source/changes.rst | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index ea4bd0fb3..1b5105df4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.13 +2.1.14 diff --git a/doc/source/changes.rst b/doc/source/changes.rst index b9f286384..e04b5ab71 100644 --- a/doc/source/changes.rst +++ b/doc/source/changes.rst @@ -2,6 +2,11 @@ Changelog ========= +2.1.14 - Bugfixes +================= + +Fix an issue with `transforming kwargs `_ passed to the `git` command. + 2.1.13 - Bring back Python 2.7 support ====================================== From 7539cd8fbbc8ac2a01d66875cecc4e7ac214f5dc Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 7 Feb 2020 10:40:40 -0600 Subject: [PATCH 03/13] Fix requirements.txt formatting --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 63d5ddfe7..5eb87ac69 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -gitdb2 (>=2.0.0) +gitdb2>=2.0.0 From bcf9f1c5c63a9578b7f8108d6dbc69a80706e807 Mon Sep 17 00:00:00 2001 From: Harmon Date: Sun, 16 Feb 2020 12:36:59 -0600 Subject: [PATCH 04/13] Require gitdb2 <3 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5eb87ac69..d312d11bb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -gitdb2>=2.0.0 +gitdb2>=2,<3 From 09ac0a109fd3a032e19ccc3017a9e1c79cda057a Mon Sep 17 00:00:00 2001 From: Harmon Date: Sun, 16 Feb 2020 12:48:16 -0600 Subject: [PATCH 05/13] v2.1.15 --- VERSION | 2 +- doc/source/changes.rst | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 1b5105df4..67da95408 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.14 +2.1.15 diff --git a/doc/source/changes.rst b/doc/source/changes.rst index e04b5ab71..97ae82d6c 100644 --- a/doc/source/changes.rst +++ b/doc/source/changes.rst @@ -2,6 +2,11 @@ Changelog ========= +2.1.15 - Bugfixes +================= + +Fix requirements.txt formatting and version lock gitdb2 to <3 for Python 2 compatibility. + 2.1.14 - Bugfixes ================= From 6991a2af1ea404fc5c6953544c263247dbaa84d7 Mon Sep 17 00:00:00 2001 From: Frederick Price Date: Thu, 3 Oct 2024 21:23:40 -0400 Subject: [PATCH 06/13] CVE-2023-40590 Hand Cherry-Picking pull/1636 --- git/cmd.py | 37 ++++++++++++++++++++++--------------- git/test/test_git.py | 31 ++++++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 16 deletions(-) diff --git a/git/cmd.py b/git/cmd.py index 50b1e3212..7ec78ee94 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from contextlib import contextmanager +import contextlib import io import logging import os @@ -19,6 +19,7 @@ import threading from collections import OrderedDict from textwrap import dedent +import unittest.mock from git.compat import ( string_types, @@ -705,11 +706,15 @@ def execute(self, command, cmd_not_found_exception = OSError if kill_after_timeout: raise GitCommandError(command, '"kill_after_timeout" feature is not supported on Windows.') + + # Only search PATH, not CWD. This must be in the *caller* environment. The "1" can be any value. + patch_caller_env = unittest.mock.patch.dict(os.environ, {"NoDefaultCurrentDirectoryInExePath": "1"}) else: if sys.version_info[0] > 2: cmd_not_found_exception = FileNotFoundError # NOQA # exists, flake8 unknown @UndefinedVariable else: cmd_not_found_exception = OSError + patch_caller_env = contextlib.nullcontext() # end handle stdout_sink = (PIPE @@ -721,19 +726,21 @@ def execute(self, command, log.debug("Popen(%s, cwd=%s, universal_newlines=%s, shell=%s, istream=%s)", command, cwd, universal_newlines, shell, istream_ok) try: - proc = Popen(command, - env=env, - cwd=cwd, - bufsize=-1, - stdin=istream, - stderr=PIPE, - stdout=stdout_sink, - shell=shell is not None and shell or self.USE_SHELL, - close_fds=is_posix, # unsupported on windows - universal_newlines=universal_newlines, - creationflags=PROC_CREATIONFLAGS, - **subprocess_kwargs - ) + with patch_caller_env: + proc = Popen( + command, + env=env, + cwd=cwd, + bufsize=-1, + stdin=istream, + stderr=PIPE, + stdout=stdout_sink, + shell=shell is not None and shell or self.USE_SHELL, + close_fds=is_posix, # unsupported on windows + universal_newlines=universal_newlines, + creationflags=PROC_CREATIONFLAGS, + **subprocess_kwargs, + ) except cmd_not_found_exception as err: raise GitCommandNotFound(command, err) @@ -862,7 +869,7 @@ def update_environment(self, **kwargs): del self._environment[key] return old_env - @contextmanager + @contextlib.contextmanager def custom_environment(self, **kwargs): """ A context manager around the above ``update_environment`` method to restore the diff --git a/git/test/test_git.py b/git/test/test_git.py index 4a189267e..6ef4de1d5 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -4,10 +4,12 @@ # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php +import contextlib import os +import shutil import subprocess import sys -from tempfile import TemporaryFile +from tempfile import TemporaryDirectory, TemporaryFile from git import ( Git, @@ -40,6 +42,16 @@ from git.compat import is_win +@contextlib.contextmanager +def _chdir(new_dir): + """Context manager to temporarily change directory. Not reentrant.""" + old_dir = os.getcwd() + os.chdir(new_dir) + try: + yield + finally: + os.chdir(old_dir) + class TestGit(TestBase): @@ -100,6 +112,23 @@ def test_it_transforms_kwargs_into_git_command_arguments(self): def test_it_executes_git_to_shell_and_returns_result(self): assert_match(r'^git version [\d\.]{2}.*$', self.git.execute(["git", "version"])) + def test_it_executes_git_not_from_cwd(self): + with TemporaryDirectory() as tmpdir: + if is_win: + # Copy an actual binary executable that is not git. + other_exe_path = os.path.join(os.getenv("WINDIR"), "system32", "hostname.exe") + impostor_path = os.path.join(tmpdir, "git.exe") + shutil.copy(other_exe_path, impostor_path) + else: + # Create a shell script that doesn't do anything. + impostor_path = os.path.join(tmpdir, "git") + with open(impostor_path, mode="w", encoding="utf-8") as file: + print("#!/bin/sh", file=file) + os.chmod(impostor_path, 0o755) + + with _chdir(tmpdir): + self.assertRegex(self.git.execute(["git", "version"]), r"^git version\b") + def test_it_accepts_stdin(self): filename = fixture_path("cat_file_blob") with open(filename, 'r') as fh: From 20f5e4215e549bc6e1991fc52d2246a9137a1883 Mon Sep 17 00:00:00 2001 From: Frederick Price Date: Thu, 3 Oct 2024 21:23:40 -0400 Subject: [PATCH 07/13] CVE-2023-40590 Hand Cherry-Picking pull/1636 Fix syntax error Switch to mock Fix print function Get TemporaryDirectory for Python2 We don't really care about the encoding of the file Its a script Use six to get assertRegex Create a nullcontext Fix unicode problem Just use the Python2 methods --- git/cmd.py | 42 +++++++++++++++++++++++++++--------------- git/test/test_git.py | 34 ++++++++++++++++++++++++++++++++++ requirements.txt | 1 + test-requirements.txt | 3 ++- 4 files changed, 64 insertions(+), 16 deletions(-) diff --git a/git/cmd.py b/git/cmd.py index 50b1e3212..7a3ccc220 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from contextlib import contextmanager +import contextlib import io import logging import os @@ -19,6 +19,7 @@ import threading from collections import OrderedDict from textwrap import dedent +import mock from git.compat import ( string_types, @@ -59,6 +60,11 @@ __all__ = ('Git',) +@contextlib.contextmanager +def nullcontext(enter_result=None): + yield enter_result + + # ============================================================================== ## @name Utilities # ------------------------------------------------------------------------------ @@ -705,11 +711,15 @@ def execute(self, command, cmd_not_found_exception = OSError if kill_after_timeout: raise GitCommandError(command, '"kill_after_timeout" feature is not supported on Windows.') + + # Only search PATH, not CWD. This must be in the *caller* environment. The "1" can be any value. + patch_caller_env = unittest.mock.patch.dict(os.environ, {"NoDefaultCurrentDirectoryInExePath": "1"}) else: if sys.version_info[0] > 2: cmd_not_found_exception = FileNotFoundError # NOQA # exists, flake8 unknown @UndefinedVariable else: cmd_not_found_exception = OSError + patch_caller_env = nullcontext() # end handle stdout_sink = (PIPE @@ -721,19 +731,21 @@ def execute(self, command, log.debug("Popen(%s, cwd=%s, universal_newlines=%s, shell=%s, istream=%s)", command, cwd, universal_newlines, shell, istream_ok) try: - proc = Popen(command, - env=env, - cwd=cwd, - bufsize=-1, - stdin=istream, - stderr=PIPE, - stdout=stdout_sink, - shell=shell is not None and shell or self.USE_SHELL, - close_fds=is_posix, # unsupported on windows - universal_newlines=universal_newlines, - creationflags=PROC_CREATIONFLAGS, - **subprocess_kwargs - ) + with patch_caller_env: + proc = Popen( + command, + env=env, + cwd=cwd, + bufsize=-1, + stdin=istream, + stderr=PIPE, + stdout=stdout_sink, + shell=shell is not None and shell or self.USE_SHELL, + close_fds=is_posix, # unsupported on windows + universal_newlines=universal_newlines, + creationflags=PROC_CREATIONFLAGS, + **subprocess_kwargs + ) except cmd_not_found_exception as err: raise GitCommandNotFound(command, err) @@ -862,7 +874,7 @@ def update_environment(self, **kwargs): del self._environment[key] return old_env - @contextmanager + @contextlib.contextmanager def custom_environment(self, **kwargs): """ A context manager around the above ``update_environment`` method to restore the diff --git a/git/test/test_git.py b/git/test/test_git.py index 4a189267e..02553e604 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -4,10 +4,16 @@ # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php +from __future__ import print_function + +import contextlib import os +import shutil import subprocess import sys from tempfile import TemporaryFile +from backports.tempfile import TemporaryDirectory +import six from git import ( Git, @@ -40,6 +46,16 @@ from git.compat import is_win +@contextlib.contextmanager +def _chdir(new_dir): + """Context manager to temporarily change directory. Not reentrant.""" + old_dir = os.getcwd() + os.chdir(new_dir) + try: + yield + finally: + os.chdir(old_dir) + class TestGit(TestBase): @@ -100,6 +116,24 @@ def test_it_transforms_kwargs_into_git_command_arguments(self): def test_it_executes_git_to_shell_and_returns_result(self): assert_match(r'^git version [\d\.]{2}.*$', self.git.execute(["git", "version"])) + def test_it_executes_git_not_from_cwd(self): + with TemporaryDirectory() as tmpdir: + if is_win: + # Copy an actual binary executable that is not git. + other_exe_path = os.path.join(os.getenv("WINDIR"), "system32", "hostname.exe") + impostor_path = os.path.join(tmpdir, "git.exe") + shutil.copy(other_exe_path, impostor_path) + else: + # Create a shell script that doesn't do anything. + impostor_path = os.path.join(tmpdir, "git") + with open(impostor_path, mode="w") as file: + print("#!/bin/sh", file=file) + os.chmod(impostor_path, 0o755) + + with _chdir(tmpdir): + # six.assertRegex(self.git.execute(["git", "version"]).encode("UTF-8"), r"^git version\b") + self.assertRegexpMatches(self.git.execute(["git", "version"]), r"^git version\b") + def test_it_accepts_stdin(self): filename = fixture_path("cat_file_blob") with open(filename, 'r') as fh: diff --git a/requirements.txt b/requirements.txt index d312d11bb..bf38ff544 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ gitdb2>=2,<3 +mock diff --git a/test-requirements.txt b/test-requirements.txt index ec0e4c561..8e4ec6181 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,4 +3,5 @@ coverage flake8 nose tox -mock; python_version=='2.7' +backports.tempfile +six From 6b1c261c667b166d058f4b30b239da852faeebb4 Mon Sep 17 00:00:00 2001 From: Frederick Price Date: Tue, 24 Sep 2024 22:21:16 -0400 Subject: [PATCH 08/13] CVE-2022-24439 Hand Cherry-Pick GitPython/pull/1521 More unfinished changes Unfinished changes Unfinished changes All code changes should be in, time to test them Fix things Tox didn't like for Python3 Fix more errors found during testing Try to fix DDT problem with Python2 --- AUTHORS | 1 + errortext.txt | 329 +++++++++++++++ git/cmd.py | 46 ++- git/exc.py | 8 + git/index/base.py | 302 +++++++++----- git/index/fun.py | 136 ++++--- git/objects/fun.py | 49 +-- git/objects/submodule/base.py | 488 ++++++++++++++++------- git/objects/tree.py | 64 +-- git/refs/symbolic.py | 162 +++++--- git/remote.py | 110 ++++- git/repo/base.py | 83 +++- git/test/performance/test_streams.py | 2 +- git/test/test_git.py | 4 +- git/test/test_index.py | 2 +- git/test/test_refs.py | 149 ++++--- git/test/test_remote.py | 465 +++++++++++++++++---- git/test/test_repo.py | 576 +++++++++++++++++++-------- git/test/test_submodule.py | 148 ++++++- git/test/test_tree.py | 37 +- git/test/test_util.py | 131 +++--- test-requirements.txt | 3 +- 22 files changed, 2478 insertions(+), 817 deletions(-) create mode 100644 errortext.txt diff --git a/AUTHORS b/AUTHORS index a0aa707c7..3504c498a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -33,5 +33,6 @@ Contributors are: -Steven Whitman -Stefan Stancu -César Izurieta +-Santos Gallegos Portions derived from other open source works and are clearly marked. diff --git a/errortext.txt b/errortext.txt new file mode 100644 index 000000000..7144fb98f --- /dev/null +++ b/errortext.txt @@ -0,0 +1,329 @@ +GitPython on  BE-3955-cve-2022-24439 [$?] +❯ docker run -it -v (pwd):/mnt/work python:2.7.18 bash +root@dc38f6142660:/# pip install "tox<4" +DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support +Collecting tox<4 + Downloading tox-3.28.0-py2.py3-none-any.whl (86 kB) + |████████████████████████████████| 86 kB 1.4 MB/s +Collecting packaging>=14 + Downloading packaging-20.9-py2.py3-none-any.whl (40 kB) + |████████████████████████████████| 40 kB 7.1 MB/s +Requirement already satisfied: filelock>=3.0.0 in /usr/local/lib/python2.7/site-packages (from tox<4) (3.0.12) +Requirement already satisfied: six>=1.14.0 in /usr/local/lib/python2.7/site-packages (from tox<4) (1.14.0) +Requirement already satisfied: virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0 in /usr/local/lib/python2.7/site-packages (from tox<4) (20.0.18) +Collecting pluggy>=0.12.0 + Downloading pluggy-0.13.1-py2.py3-none-any.whl (18 kB) +Requirement already satisfied: importlib-metadata>=0.12; python_version < "3.8" in /usr/local/lib/python2.7/site-packages (from tox<4) (1.6.0) +Collecting toml>=0.10.2; python_version <= "3.6" + Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB) +Collecting py>=1.4.17 + Downloading py-1.11.0-py2.py3-none-any.whl (98 kB) + |████████████████████████████████| 98 kB 8.8 MB/s +Collecting pyparsing>=2.0.2 + Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB) + |████████████████████████████████| 67 kB 11.5 MB/s +Requirement already satisfied: distlib<1,>=0.3.0 in /usr/local/lib/python2.7/site-packages (from virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0->tox<4) (0.3.0) +Requirement already satisfied: pathlib2<3,>=2.3.3; python_version < "3.4" and sys_platform != "win32" in /usr/local/lib/python2.7/site-packages (from virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0->tox<4) (2.3.5) +Requirement already satisfied: contextlib2<1,>=0.6.0; python_version < "3.3" in /usr/local/lib/python2.7/site-packages (from virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0->tox<4) (0.6.0.post1) +Requirement already satisfied: importlib-resources<2,>=1.0; python_version < "3.7" in /usr/local/lib/python2.7/site-packages (from virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0->tox<4) (1.4.0) +Requirement already satisfied: appdirs<2,>=1.4.3 in /usr/local/lib/python2.7/site-packages (from virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0->tox<4) (1.4.3) +Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python2.7/site-packages (from importlib-metadata>=0.12; python_version < "3.8"->tox<4) (1.2.0) +Requirement already satisfied: configparser>=3.5; python_version < "3" in /usr/local/lib/python2.7/site-packages (from importlib-metadata>=0.12; python_version < "3.8"->tox<4) (4.0.2) +Requirement already satisfied: scandir; python_version < "3.5" in /usr/local/lib/python2.7/site-packages (from pathlib2<3,>=2.3.3; python_version < "3.4" and sys_platform != "win32"->virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0->tox<4) (1.10.0) +Requirement already satisfied: singledispatch; python_version < "3.4" in /usr/local/lib/python2.7/site-packages (from importlib-resources<2,>=1.0; python_version < "3.7"->virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0->tox<4) (3.4.0.3) +Requirement already satisfied: typing; python_version < "3.5" in /usr/local/lib/python2.7/site-packages (from importlib-resources<2,>=1.0; python_version < "3.7"->virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0->tox<4) (3.7.4.1) +Installing collected packages: pyparsing, packaging, pluggy, toml, py, tox +Successfully installed packaging-20.9 pluggy-0.13.1 py-1.11.0 pyparsing-2.4.7 toml-0.10.2 tox-3.28.0 +WARNING: You are using pip version 20.0.2; however, version 20.3.4 is available. +You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command. +root@dc38f6142660:/# git config --global user.email ci@gitpython.org +root@dc38f6142660:/# git config --global user.name "GitPython CI User" +root@dc38f6142660:/# tox -e py27 +ERROR: tox config file (either pyproject.toml, tox.ini, setup.cfg) not found +root@dc38f6142660:/# cd /mnt/work/ +root@dc38f6142660:/mnt/work# cd /mnt/work +root@dc38f6142660:/mnt/work# rm -rf .tox +root@dc38f6142660:/mnt/work# tox -e py27 +GLOB sdist-make: /mnt/work/setup.py +py27 create: /mnt/work/.tox/py27 +py27 installdeps: -r/mnt/work/requirements.txt, -r/mnt/work/test-requirements.txt +py27 inst: /mnt/work/.tox/.tmp/package/1/GitPython-2.1.15.zip +py27 installed: DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support,configparser==4.0.2,contextlib2==0.6.0.post1,coverage==5.5,ddt==1.6.0,distlib==0.3.8,enum34==1.1.10,filelock==3.2.1,flake8==3.9.2,funcsigs==1.0.2,functools32==3.2.3.post2,gitdb2==2.0.6,GitPython==2.1.15,importlib-metadata==2.1.3,importlib-resources==3.3.1,mccabe==0.6.1,mock==3.0.5,nose==1.3.7,packaging==20.9,pathlib2==2.3.7.post1,platformdirs==2.0.2,pluggy==0.13.1,py==1.11.0,pycodestyle==2.7.0,pyflakes==2.3.1,pyparsing==2.4.7,scandir==1.10.0,singledispatch==3.7.0,six==1.16.0,smmap==3.0.5,smmap2==3.0.1,toml==0.10.2,tox==3.28.0,typing==3.10.0.0,virtualenv==20.15.1,zipp==1.2.0 +py27 run-test-pre: PYTHONHASHSEED='2248876707' +py27 run-test: commands[0] | nosetests +Iterated 1912 Commits in 150.353966951 [s] ( 12.716658 commits/s ) +.Serialized 2454 and deserialized 1227 commits in 150.787314 s ( (16.274579, 8.137289) commits / s +Serialized 5000 commits to loose objects in 0.372449 s ( 13424.651045 commits / s ) +.Traversed 1911 Commits in 149.267437935 [s] ( 12.802524 commits/s ) +.Traversed 161 Trees and a total of 11863 uncached objects in 224.727527142 [s] ( 52.788371 objs/s ) +.: Retrieved 1911 commits from ObjectStore in 150.17 s ( 12.725574 commits / s ) +: Retrieved 296904 objects from 1911 commits in 1.68453 s ( 176253.414665 objects / s ) +: Retrieved 15061 blob (162266 KiB) and their data in 0.548107 s ( 27478.203991 blobs / s, 296047.954901 KiB / s ) +: Retrieved 1911 commits from ObjectStore in 0.0760839 s ( 25117.009467 commits / s ) +: Retrieved 296904 objects from 1911 commits in 2.7054 s ( 109744.829209 objects / s ) +: Retrieved 15061 blob (162266 KiB) and their data in 1.57216 s ( 9579.820989 blobs / s, 103212.219153 KiB / s ) +Iterate Commits: 150.170044 s vs 0.076084 s, pure is 0.000507 times slower +Iterate Blobs: 1.684529 s vs 2.705403 s, pure is 1.606029 times slower +Retrieve Blob Data: 0.548107 s vs 1.572159 s, pure is 2.868342 times slower +.Creating data ... +Done (in 0.081439 s) +Added 10000 KiB (filesize = 3458 KiB) of data to loose odb in 0.080718 s ( 123888.042156 Write KiB / s) +Read 10000 KiB of data at once from loose odb in 0.029456 s ( 339490.558249 Read KiB / s) +Read 10000 KiB of data in 512 KiB chunks from loose odb in 0.028449 s ( 351505.480876 Read KiB / s) +Added 10000 KiB (filesize = 3458 KiB) of data to using git-hash-object in 0.110427 s ( 90557.642649 Write KiB / s) +Git-Python is 26.903645 % faster than git when adding big files Read 10000 KiB of data at once using git-cat-file in 75.232747 s ( 132.920841 Read KiB / s) +Git-Python is 99.960847 % faster than git when reading big files +Read 10000 KiB of data in 512 KiB chunks from git-cat-file in 0.027704 s ( 360958.700161 Read KiB / s) +Git-Python is -2.689352 % faster than git when reading big files in chunks +Creating random data ... +Done (in 0.884554 s) +Added 10000 KiB (filesize = 8220 KiB) of random data to loose odb in 0.227257 s ( 44003.042431 Write KiB / s) +Read 10000 KiB of random data at once from loose odb in 0.048357 s ( 206795.251055 Read KiB / s) +Read 10000 KiB of random data in 512 KiB chunks from loose odb in 0.049814 s ( 200746.835140 Read KiB / s) +Added 10000 KiB (filesize = 8220 KiB) of random data to using git-hash-object in 0.259930 s ( 38471.911761 Write KiB / s) +Git-Python is 12.569882 % faster than git when adding big random files +Read 10000 KiB of random data at once using git-cat-file in 0.056953 s ( 175582.784590 Read KiB / s) +Git-Python is 15.093415 % faster than git when reading big random files +Read 10000 KiB of random data in 512 KiB chunks from git-cat-file in 0.054024 s ( 185102.981999 Read KiB / s) +Git-Python is 7.792827 % faster than git when reading big random files in chunks +........................................S.........................FE.............................................................................................................................................S......................................................E.............F....F................... +......................../mnt/work/git/test/test_repo.py:753: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal + num_test_untracked += join_path_native(base, utfile) in files +F...11 + + .^[^[zt^[^[^[ + ........EE..EE..S....FSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS....... + ====================================================================== + ERROR: test_references_and_objects (git.test.test_docs.Tutorials) + ---------------------------------------------------------------------- + Traceback (most recent call last): + File "/mnt/work/git/test/lib/helper.py", line 92, in wrapper + return func(self, path) + File "/mnt/work/git/test/test_docs.py", line 395, in test_references_and_objects + origin.pull() + File "/mnt/work/git/remote.py", line 864, in pull + refspec = Git._unpack_args(refspec or []) + AttributeError: type object 'Git' has no attribute '_unpack_args' + -------------------- >> begin captured stdout << --------------------- + e61d27ba9930b596a1c874251e594c95bc3b167a + 50a985844ce6b3f670ad9a1d94cd26748987439e + 85cc74fdfee7b7ac684d15a5840af384ea9bc3b7 + 710010f1fe0311afd9823e319ff958827a419964 + 399a207e69d477d0fe8589b94c90c7ecd69ae6d3 + 20436bbc49dfef2c290003cc55b54a38aac9ff87 + e21f534537b22a58eea2d3d579afd0bcb6edf72a + 5840e4472bf1d458e74f789d87119416c3406a4c + 879dcbc91ea7d8dab41479d4e47c157a1ed898ae + 38c535ba5efda20769278c23aa7792ca01d6c789 + d7e18420b32362cc0f10b66b317f92ee9c7d7d8c + 64b00fe8bde32f43ae99327a635ce9412fb52ebc + f7205c5a349ca9916f33f8117e5e66b6bcf653db + + --------------------- >> end captured stdout << ---------------------- + -------------------- >> begin captured logging << -------------------- + git.cmd: DEBUG: Popen(['git', 'clone', '--branch=master', '-v', '--', '/mnt/work/git/ext/gitdb/gitdb/ext/smmap', '/tmp/test_references_and_objectsKIWD69/repo'], cwd=/mnt/work, universal_newlines=True, shell=None, istream=None) + git.repo.base: DEBUG: Cmd(['git', 'clone', '--branch=master', '-v', '--', '/mnt/work/git/ext/gitdb/gitdb/ext/smmap', '/tmp/test_references_and_objectsKIWD69/repo'])'s unused stdout: + git.cmd: DEBUG: Popen(['git', 'cat-file', '--batch-check'], cwd=/tmp/test_references_and_objectsKIWD69/repo, universal_newlines=False, shell=None, istream=) + git.cmd: DEBUG: Popen(['git', 'branch', '-m', 'master', 'new_name'], cwd=/tmp/test_references_and_objectsKIWD69/repo, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'branch', '-m', 'new_name', 'master'], cwd=/tmp/test_references_and_objectsKIWD69/repo, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'cat-file', '--batch'], cwd=/tmp/test_references_and_objectsKIWD69/repo, universal_newlines=False, shell=None, istream=) + git.cmd: DEBUG: Popen(['git', 'tag', '-d', 'smmap2-v3.0.0'], cwd=/tmp/test_references_and_objectsKIWD69/repo, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'tag', 'my_tag', 'HEAD'], cwd=/tmp/test_references_and_objectsKIWD69/repo, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'branch', '-d', 'new'], cwd=/tmp/test_references_and_objectsKIWD69/repo, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'tag', '-m', 'my message', 'my_new_tag', 'HEAD'], cwd=/tmp/test_references_and_objectsKIWD69/repo, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'tag', '-d', 'my_new_tag'], cwd=/tmp/test_references_and_objectsKIWD69/repo, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'rev-list', '--max-count=50', 'master', '--'], cwd=/tmp/test_references_and_objectsKIWD69/repo, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'rev-list', '--max-count=10', '--skip=20', 'master', '--'], cwd=/tmp/test_references_and_objectsKIWD69/repo, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'rm', '--cached', '--', 'LICENSE'], cwd=/tmp/test_references_and_objectsKIWD69/repo, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'read-tree', '--index-output=/tmp/test_references_and_objectsKIWD69/repo/.git/JFh0J8', 'HEAD~1'], cwd=/tmp/test_references_and_objectsKIWD69/repo, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'merge-base', 'HEAD~10', 'HEAD'], cwd=/tmp/test_references_and_objectsKIWD69/repo, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'read-tree', '--reset', '--aggressive', '--index-output=/tmp/test_references_and_objectsKIWD69/repo/.git/SilWs2', 'HEAD~10', 'HEAD', '810ae3ad3f94a6a1b54231f88d13b7e071d1278c'], cwd=/tmp/test_references_and_objectsKIWD69/repo, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'init'], cwd=/tmp/test_references_and_objectsKIWD69/empty, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'remote', 'add', '--', 'origin', '/mnt/work/git/ext/gitdb/gitdb/ext/smmap'], cwd=/tmp/test_references_and_objectsKIWD69/empty, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'fetch', '-v', '--', 'origin'], cwd=/tmp/test_references_and_objectsKIWD69/empty, universal_newlines=True, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'cat-file', '--batch-check'], cwd=/tmp/test_references_and_objectsKIWD69/empty, universal_newlines=False, shell=None, istream=) + git.cmd: DEBUG: Popen(['git', 'checkout', 'master'], cwd=/tmp/test_references_and_objectsKIWD69/empty, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'checkout', 'master'], cwd=/tmp/test_references_and_objectsKIWD69/empty, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['git', 'remote', 'rename', 'origin', 'new_origin'], cwd=/tmp/test_references_and_objectsKIWD69/empty, universal_newlines=False, shell=None, istream=None) + git.test.lib.helper: INFO: Test Tutorials.test_references_and_objects failed, output is at '/tmp/test_references_and_objectsKIWD69' + + --------------------- >> end captured logging << --------------------- + + ====================================================================== + ERROR: Failure: SyntaxError (invalid syntax (test_remote.py, line 963)) + ---------------------------------------------------------------------- + Traceback (most recent call last): + File "/mnt/work/.tox/py27/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName + addr.filename, addr.module) + File "/mnt/work/.tox/py27/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath + return self.importFromDir(dir_path, fqname) + File "/mnt/work/.tox/py27/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir + mod = load_module(part_fqname, fh, filename, desc) + File "/mnt/work/git/test/test_remote.py", line 963 + remote.push(**unsafe_option, allow_unsafe_options=True) + ^ + SyntaxError: invalid syntax + + ====================================================================== + ERROR: test_submodule_add_unsafe_options (git.test.test_submodule.TestSubmodule) + ---------------------------------------------------------------------- + Traceback (most recent call last): + File "/mnt/work/git/test/lib/helper.py", line 141, in repo_creator + return func(self, rw_repo) + File "/mnt/work/git/test/test_submodule.py", line 989, in test_submodule_add_unsafe_options + Submodule.add(rw_repo, "new", "new", str(tmp_dir), clone_multi_options=[unsafe_option]) + TypeError: add() got an unexpected keyword argument 'clone_multi_options' + -------------------- >> begin captured logging << -------------------- + git.cmd: DEBUG: Popen(['/usr/bin/git', 'clone', '-n', '--shared', '-v', '--', '/mnt/work/.git', '/tmp/non_bare_test_submodule_add_unsafe_optionsHB9mN1'], cwd=/mnt/work, universal_newlines=True, shell=None, istream=None) + git.repo.base: DEBUG: Cmd(['/usr/bin/git', 'clone', '-n', '--shared', '-v', '--', '/mnt/work/.git', '/tmp/non_bare_test_submodule_add_unsafe_optionsHB9mN1'])'s unused stdout: + git.cmd: DEBUG: Popen(['/usr/bin/git', 'cat-file', '--batch-check'], cwd=/tmp/non_bare_test_submodule_add_unsafe_optionsHB9mN1, universal_newlines=False, shell=None, istream=) + git.cmd: DEBUG: Popen(['/usr/bin/git', 'checkout', 'BE-3955-cve-2022-24439'], cwd=/tmp/non_bare_test_submodule_add_unsafe_optionsHB9mN1, universal_newlines=False, shell=None, istream=None) + git.test.lib.helper: INFO: Keeping repo after failure: /tmp/non_bare_test_submodule_add_unsafe_optionsHB9mN1 + --------------------- >> end captured logging << --------------------- + + ====================================================================== + ERROR: test_submodule_add_unsafe_options_allowed (git.test.test_submodule.TestSubmodule) + ---------------------------------------------------------------------- + Traceback (most recent call last): + File "/mnt/work/git/test/lib/helper.py", line 141, in repo_creator + return func(self, rw_repo) + File "/mnt/work/git/test/test_submodule.py", line 1004, in test_submodule_add_unsafe_options_allowed + rw_repo, "new", "new", str(tmp_dir), clone_multi_options=[unsafe_option], allow_unsafe_options=True + TypeError: add() got an unexpected keyword argument 'clone_multi_options' + -------------------- >> begin captured logging << -------------------- + git.cmd: DEBUG: Popen(['/usr/bin/git', 'clone', '-n', '--shared', '-v', '--', '/mnt/work/.git', '/tmp/non_bare_test_submodule_add_unsafe_options_allowedrRyDE0'], cwd=/mnt/work, universal_newlines=True, shell=None, istream=None) + git.repo.base: DEBUG: Cmd(['/usr/bin/git', 'clone', '-n', '--shared', '-v', '--', '/mnt/work/.git', '/tmp/non_bare_test_submodule_add_unsafe_options_allowedrRyDE0'])'s unused stdout: + git.cmd: DEBUG: Popen(['/usr/bin/git', 'cat-file', '--batch-check'], cwd=/tmp/non_bare_test_submodule_add_unsafe_options_allowedrRyDE0, universal_newlines=False, shell=None, istream=) + git.cmd: DEBUG: Popen(['/usr/bin/git', 'checkout', 'BE-3955-cve-2022-24439'], cwd=/tmp/non_bare_test_submodule_add_unsafe_options_allowedrRyDE0, universal_newlines=False, shell=None, istream=None) + git.test.lib.helper: INFO: Keeping repo after failure: /tmp/non_bare_test_submodule_add_unsafe_options_allowedrRyDE0 + --------------------- >> end captured logging << --------------------- + + ====================================================================== + ERROR: test_submodule_update_unsafe_options (git.test.test_submodule.TestSubmodule) + ---------------------------------------------------------------------- + Traceback (most recent call last): + File "/mnt/work/git/test/lib/helper.py", line 141, in repo_creator + return func(self, rw_repo) + File "/mnt/work/git/test/test_submodule.py", line 1060, in test_submodule_update_unsafe_options + submodule.update(clone_multi_options=[unsafe_option]) + TypeError: update() got an unexpected keyword argument 'clone_multi_options' + -------------------- >> begin captured logging << -------------------- + git.cmd: DEBUG: Popen(['/usr/bin/git', 'clone', '-n', '--shared', '-v', '--', '/mnt/work/.git', '/tmp/non_bare_test_submodule_update_unsafe_optionsspe95L'], cwd=/mnt/work, universal_newlines=True, shell=None, istream=None) + git.repo.base: DEBUG: Cmd(['/usr/bin/git', 'clone', '-n', '--shared', '-v', '--', '/mnt/work/.git', '/tmp/non_bare_test_submodule_update_unsafe_optionsspe95L'])'s unused stdout: + git.cmd: DEBUG: Popen(['/usr/bin/git', 'cat-file', '--batch-check'], cwd=/tmp/non_bare_test_submodule_update_unsafe_optionsspe95L, universal_newlines=False, shell=None, istream=) + git.cmd: DEBUG: Popen(['/usr/bin/git', 'checkout', 'BE-3955-cve-2022-24439'], cwd=/tmp/non_bare_test_submodule_update_unsafe_optionsspe95L, universal_newlines=False, shell=None, istream=None) + git.test.lib.helper: INFO: Keeping repo after failure: /tmp/non_bare_test_submodule_update_unsafe_optionsspe95L + --------------------- >> end captured logging << --------------------- + + ====================================================================== + ERROR: test_submodule_update_unsafe_options_allowed (git.test.test_submodule.TestSubmodule) + ---------------------------------------------------------------------- + Traceback (most recent call last): + File "/mnt/work/git/test/lib/helper.py", line 141, in repo_creator + return func(self, rw_repo) + File "/mnt/work/git/test/test_submodule.py", line 1075, in test_submodule_update_unsafe_options_allowed + submodule.update(clone_multi_options=[unsafe_option], allow_unsafe_options=True) + TypeError: update() got an unexpected keyword argument 'clone_multi_options' + -------------------- >> begin captured logging << -------------------- + git.cmd: DEBUG: Popen(['/usr/bin/git', 'clone', '-n', '--shared', '-v', '--', '/mnt/work/.git', '/tmp/non_bare_test_submodule_update_unsafe_options_allowedipPrsm'], cwd=/mnt/work, universal_newlines=True, shell=None, istream=None) + git.repo.base: DEBUG: Cmd(['/usr/bin/git', 'clone', '-n', '--shared', '-v', '--', '/mnt/work/.git', '/tmp/non_bare_test_submodule_update_unsafe_options_allowedipPrsm'])'s unused stdout: + git.cmd: DEBUG: Popen(['/usr/bin/git', 'cat-file', '--batch-check'], cwd=/tmp/non_bare_test_submodule_update_unsafe_options_allowedipPrsm, universal_newlines=False, shell=None, istream=) + git.cmd: DEBUG: Popen(['/usr/bin/git', 'checkout', 'BE-3955-cve-2022-24439'], cwd=/tmp/non_bare_test_submodule_update_unsafe_options_allowedipPrsm, universal_newlines=False, shell=None, istream=None) + git.test.lib.helper: INFO: Keeping repo after failure: /tmp/non_bare_test_submodule_update_unsafe_options_allowedipPrsm + --------------------- >> end captured logging << --------------------- + +====================================================================== +FAIL: test_init_repo_object (git.test.test_docs.Tutorials) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "/mnt/work/git/test/lib/helper.py", line 92, in wrapper + return func(self, path) + File "/mnt/work/git/test/test_docs.py", line 75, in test_init_repo_object + "It's ok if TC not running from `master`.") +AssertionError: It's ok if TC not running from `master`. +-------------------- >> begin captured logging << -------------------- +git.cmd: DEBUG: Popen(['git', 'init', '--bare'], cwd=/tmp/test_init_repo_objectyE5EWV/bare-repo, universal_newlines=False, shell=None, istream=None) +git.cmd: DEBUG: Popen(['git', 'status', '--porcelain', '--untracked-files'], cwd=/mnt/work, universal_newlines=False, shell=None, istream=None) +git.cmd: DEBUG: Popen(['git', 'clone', '-v', '--', '/mnt/work/.git', '/tmp/test_init_repo_objectyE5EWV/to/this/path'], cwd=/mnt/work, universal_newlines=True, shell=None, istream=None) +git.repo.base: DEBUG: Cmd(['git', 'clone', '-v', '--', '/mnt/work/.git', '/tmp/test_init_repo_objectyE5EWV/to/this/path'])'s unused stdout: +git.cmd: DEBUG: Popen(['git', 'init'], cwd=/tmp/test_init_repo_objectyE5EWV/path/for/new/repo, universal_newlines=False, shell=None, istream=None) +git.cmd: DEBUG: Popen(['git', 'cat-file', '--batch-check'], cwd=/mnt/work, universal_newlines=False, shell=None, istream=) +git.cmd: DEBUG: Popen(['git', 'archive', '--', '2894c0a889e58e6edb81b78cb835bc09a8d20b12'], cwd=/mnt/work, universal_newlines=False, shell=None, istream=None) +git.test.lib.helper: INFO: Test Tutorials.test_init_repo_object failed, output is at '/tmp/test_init_repo_objectyE5EWV' + +--------------------- >> end captured logging << --------------------- + + ====================================================================== + FAIL: test_clone_from_unsafe_options_allowed (git.test.test_repo.TestRepo) + ---------------------------------------------------------------------- + Traceback (most recent call last): + File "/mnt/work/git/test/lib/helper.py", line 141, in repo_creator + return func(self, rw_repo) + File "/mnt/work/git/test/test_repo.py", line 382, in test_clone_from_unsafe_options_allowed + assert tmp_file.exists() + AssertionError: + -------------------- >> begin captured logging << -------------------- + git.cmd: DEBUG: Popen(['/usr/bin/git', 'clone', '-n', '--shared', '-v', '--', '/mnt/work/.git', '/tmp/non_bare_test_clone_from_unsafe_options_allowedEjNaci'], cwd=/mnt/work, universal_newlines=True, shell=None, istream=None) + git.repo.base: DEBUG: Cmd(['/usr/bin/git', 'clone', '-n', '--shared', '-v', '--', '/mnt/work/.git', '/tmp/non_bare_test_clone_from_unsafe_options_allowedEjNaci'])'s unused stdout: + git.cmd: DEBUG: Popen(['/usr/bin/git', 'cat-file', '--batch-check'], cwd=/tmp/non_bare_test_clone_from_unsafe_options_allowedEjNaci, universal_newlines=False, shell=None, istream=) + git.cmd: DEBUG: Popen(['/usr/bin/git', 'checkout', 'BE-3955-cve-2022-24439'], cwd=/tmp/non_bare_test_clone_from_unsafe_options_allowedEjNaci, universal_newlines=False, shell=None, istream=None) + git.cmd: DEBUG: Popen(['/usr/bin/git', 'clone', '-v', "--upload-pack='touch", "/tmp/tmp9vTvae/pwn'", '--', '/tmp/non_bare_test_clone_from_unsafe_options_allowedEjNaci', '/tmp/tmp9vTvae/0'], cwd=/tmp/non_bare_test_clone_from_unsafe_options_allowedEjNaci, universal_newlines=True, shell=None, istream=None) + git.repo.base: DEBUG: Cmd(['/usr/bin/git', 'clone', '-v', "--upload-pack='touch", "/tmp/tmp9vTvae/pwn'", '--', '/tmp/non_bare_test_clone_from_unsafe_options_allowedEjNaci', '/tmp/tmp9vTvae/0'])'s unused stdout: + git.cmd: DEBUG: AutoInterrupt wait stderr: "fatal: Too many arguments.\n\nusage: git clone [] [--] []\n\n -v, --verbose be more verbose\n -q, --quiet be more quiet\n --progress force progress reporting\n -n, --no-checkout don't create a checkout\n --bare create a bare repository\n --mirror create a mirror repository (implies bare)\n -l, --local to clone from a local repository\n --no-hardlinks don't use local hardlinks, always copy\n -s, --shared setup as shared repository\n --recurse-submodules[=]\n initialize submodules in the clone\n -j, --jobs number of submodules cloned in parallel\n --template \n directory from which templates will be used\n --reference reference repository\n --reference-if-able \n reference repository\n --dissociate use --reference only while cloning\n -o, --origin use instead of 'origin' to track upstream\n -b, --branch \n checkout instead of the remote's HEAD\n -u, --upload-pack \n path to git-upload-pack on the remote\n --depth create a shallow clone of that depth\n --shallow-since