GitPython 3.1.62__tar.gz → 3.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gitpython-3.1.62 → gitpython-3.2.0/GitPython.egg-info}/PKG-INFO +8 -22
- {gitpython-3.1.62 → gitpython-3.2.0}/GitPython.egg-info/SOURCES.txt +0 -2
- {gitpython-3.1.62 → gitpython-3.2.0}/GitPython.egg-info/requires.txt +1 -8
- {gitpython-3.1.62/GitPython.egg-info → gitpython-3.2.0}/PKG-INFO +8 -22
- {gitpython-3.1.62 → gitpython-3.2.0}/README.md +1 -1
- gitpython-3.2.0/VERSION +1 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/doc/source/changes.rst +25 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/doc/source/intro.rst +1 -1
- {gitpython-3.1.62 → gitpython-3.2.0}/doc/source/tutorial.rst +25 -14
- {gitpython-3.1.62 → gitpython-3.2.0}/git/__init__.py +2 -2
- {gitpython-3.1.62 → gitpython-3.2.0}/git/cmd.py +134 -40
- {gitpython-3.1.62 → gitpython-3.2.0}/git/config.py +133 -63
- {gitpython-3.1.62 → gitpython-3.2.0}/git/diff.py +12 -3
- {gitpython-3.1.62 → gitpython-3.2.0}/git/index/base.py +67 -14
- {gitpython-3.1.62 → gitpython-3.2.0}/git/index/fun.py +42 -12
- {gitpython-3.1.62 → gitpython-3.2.0}/git/index/typ.py +15 -8
- {gitpython-3.1.62 → gitpython-3.2.0}/git/objects/base.py +10 -2
- {gitpython-3.1.62 → gitpython-3.2.0}/git/objects/blob.py +1 -5
- {gitpython-3.1.62 → gitpython-3.2.0}/git/objects/commit.py +18 -15
- {gitpython-3.1.62 → gitpython-3.2.0}/git/objects/fun.py +35 -43
- {gitpython-3.1.62 → gitpython-3.2.0}/git/objects/submodule/base.py +121 -48
- {gitpython-3.1.62 → gitpython-3.2.0}/git/objects/submodule/root.py +80 -68
- {gitpython-3.1.62 → gitpython-3.2.0}/git/objects/tag.py +3 -8
- {gitpython-3.1.62 → gitpython-3.2.0}/git/objects/tree.py +3 -9
- {gitpython-3.1.62 → gitpython-3.2.0}/git/objects/util.py +4 -3
- {gitpython-3.1.62 → gitpython-3.2.0}/git/refs/head.py +3 -3
- {gitpython-3.1.62 → gitpython-3.2.0}/git/refs/reference.py +1 -1
- {gitpython-3.1.62 → gitpython-3.2.0}/git/refs/remote.py +1 -1
- {gitpython-3.1.62 → gitpython-3.2.0}/git/refs/symbolic.py +62 -16
- {gitpython-3.1.62 → gitpython-3.2.0}/git/refs/tag.py +2 -2
- {gitpython-3.1.62 → gitpython-3.2.0}/git/remote.py +27 -17
- {gitpython-3.1.62 → gitpython-3.2.0}/git/repo/base.py +55 -22
- {gitpython-3.1.62 → gitpython-3.2.0}/git/repo/fun.py +27 -101
- {gitpython-3.1.62 → gitpython-3.2.0}/git/types.py +23 -17
- {gitpython-3.1.62 → gitpython-3.2.0}/git/util.py +38 -10
- {gitpython-3.1.62 → gitpython-3.2.0}/pyproject.toml +60 -10
- gitpython-3.2.0/setup.py +66 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/test-requirements.txt +1 -1
- gitpython-3.1.62/GitPython.egg-info/not-zip-safe +0 -1
- gitpython-3.1.62/VERSION +0 -1
- gitpython-3.1.62/doc/requirements.txt +0 -3
- gitpython-3.1.62/setup.py +0 -115
- {gitpython-3.1.62 → gitpython-3.2.0}/AUTHORS +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/CHANGES +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/CONTRIBUTING.md +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/GitPython.egg-info/dependency_links.txt +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/GitPython.egg-info/top_level.txt +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/LICENSE +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/MANIFEST.in +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/doc/.gitignore +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/doc/Makefile +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/doc/source/conf.py +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/doc/source/index.rst +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/doc/source/quickstart.rst +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/doc/source/reference.rst +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/doc/source/roadmap.rst +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/git/compat.py +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/git/db.py +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/git/exc.py +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/git/index/__init__.py +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/git/index/util.py +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/git/objects/__init__.py +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/git/objects/submodule/__init__.py +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/git/objects/submodule/util.py +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/git/py.typed +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/git/refs/__init__.py +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/git/refs/log.py +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/git/repo/__init__.py +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/requirements.txt +0 -0
- {gitpython-3.1.62 → gitpython-3.2.0}/setup.cfg +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: GitPython
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.2.0
|
|
4
4
|
Summary: GitPython is a Python library used to interact with Git repositories
|
|
5
|
-
|
|
6
|
-
Author: Sebastian Thiel, Michael Trier
|
|
7
|
-
Author-email: byronimo@gmail.com, mtrier@gmail.com
|
|
5
|
+
Author-email: Sebastian Thiel <byronimo@gmail.com>, Michael Trier <mtrier@gmail.com>
|
|
8
6
|
License: BSD-3-Clause
|
|
7
|
+
Project-URL: Source code, https://github.com/gitpython-developers/GitPython
|
|
8
|
+
Project-URL: Documentation, https://gitpython.readthedocs.io/en/stable/
|
|
9
|
+
Keywords: git
|
|
9
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
11
|
Classifier: Environment :: Console
|
|
11
12
|
Classifier: Intended Audience :: Developers
|
|
@@ -16,7 +17,6 @@ Classifier: Operating System :: MacOS :: MacOS X
|
|
|
16
17
|
Classifier: Typing :: Typed
|
|
17
18
|
Classifier: Programming Language :: Python
|
|
18
19
|
Classifier: Programming Language :: Python :: 3
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.8
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.9
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.10
|
|
@@ -25,7 +25,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
25
25
|
Classifier: Programming Language :: Python :: 3.13
|
|
26
26
|
Classifier: Programming Language :: Python :: 3.14
|
|
27
27
|
Classifier: Programming Language :: Python :: 3.15
|
|
28
|
-
Requires-Python: >=3.
|
|
28
|
+
Requires-Python: >=3.8
|
|
29
29
|
Description-Content-Type: text/markdown
|
|
30
30
|
License-File: LICENSE
|
|
31
31
|
License-File: AUTHORS
|
|
@@ -35,7 +35,7 @@ Provides-Extra: test
|
|
|
35
35
|
Requires-Dist: coverage[toml]; extra == "test"
|
|
36
36
|
Requires-Dist: basedpyright==1.39.9; (python_version >= "3.9" and sys_platform != "cygwin") and extra == "test"
|
|
37
37
|
Requires-Dist: ddt!=1.4.3,>=1.1.1; extra == "test"
|
|
38
|
-
Requires-Dist: mock;
|
|
38
|
+
Requires-Dist: mock; extra == "test"
|
|
39
39
|
Requires-Dist: mypy==1.18.2; python_version >= "3.9" and extra == "test"
|
|
40
40
|
Requires-Dist: pre-commit; extra == "test"
|
|
41
41
|
Requires-Dist: pytest>=7.3.1; extra == "test"
|
|
@@ -44,22 +44,8 @@ Requires-Dist: pytest-instafail; extra == "test"
|
|
|
44
44
|
Requires-Dist: pytest-mock; extra == "test"
|
|
45
45
|
Requires-Dist: pytest-sugar; extra == "test"
|
|
46
46
|
Requires-Dist: typing-extensions; python_version < "3.11" and extra == "test"
|
|
47
|
-
Provides-Extra: doc
|
|
48
|
-
Requires-Dist: sphinx<8,>=7.4.7; extra == "doc"
|
|
49
|
-
Requires-Dist: sphinx_rtd_theme; extra == "doc"
|
|
50
|
-
Requires-Dist: sphinx-autodoc-typehints; extra == "doc"
|
|
51
|
-
Dynamic: author
|
|
52
|
-
Dynamic: author-email
|
|
53
|
-
Dynamic: classifier
|
|
54
|
-
Dynamic: description
|
|
55
|
-
Dynamic: description-content-type
|
|
56
|
-
Dynamic: home-page
|
|
57
47
|
Dynamic: license
|
|
58
48
|
Dynamic: license-file
|
|
59
|
-
Dynamic: provides-extra
|
|
60
|
-
Dynamic: requires-dist
|
|
61
|
-
Dynamic: requires-python
|
|
62
|
-
Dynamic: summary
|
|
63
49
|
|
|
64
50
|

|
|
65
51
|
[](https://readthedocs.org/projects/gitpython/?badge=stable)
|
|
@@ -107,7 +93,7 @@ GitPython needs the `git` executable to be installed on the system and available
|
|
|
107
93
|
by setting the `GIT_PYTHON_GIT_EXECUTABLE=<path/to/git>` environment variable.
|
|
108
94
|
|
|
109
95
|
- Git (1.7.x or newer)
|
|
110
|
-
- Python >= 3.
|
|
96
|
+
- Python >= 3.8
|
|
111
97
|
|
|
112
98
|
The list of dependencies are listed in [`./requirements.txt`](https://github.com/gitpython-developers/GitPython/blob/main/requirements.txt) and [`./test-requirements.txt`](https://github.com/gitpython-developers/GitPython/blob/main/test-requirements.txt).
|
|
113
99
|
The installer takes care of installing them for you.
|
|
@@ -12,12 +12,10 @@ test-requirements.txt
|
|
|
12
12
|
GitPython.egg-info/PKG-INFO
|
|
13
13
|
GitPython.egg-info/SOURCES.txt
|
|
14
14
|
GitPython.egg-info/dependency_links.txt
|
|
15
|
-
GitPython.egg-info/not-zip-safe
|
|
16
15
|
GitPython.egg-info/requires.txt
|
|
17
16
|
GitPython.egg-info/top_level.txt
|
|
18
17
|
doc/.gitignore
|
|
19
18
|
doc/Makefile
|
|
20
|
-
doc/requirements.txt
|
|
21
19
|
doc/source/changes.rst
|
|
22
20
|
doc/source/conf.py
|
|
23
21
|
doc/source/index.rst
|
|
@@ -3,14 +3,10 @@ gitdb<5,>=4.0.1
|
|
|
3
3
|
[:python_version < "3.10"]
|
|
4
4
|
typing-extensions>=3.10.0.2
|
|
5
5
|
|
|
6
|
-
[doc]
|
|
7
|
-
sphinx<8,>=7.4.7
|
|
8
|
-
sphinx_rtd_theme
|
|
9
|
-
sphinx-autodoc-typehints
|
|
10
|
-
|
|
11
6
|
[test]
|
|
12
7
|
coverage[toml]
|
|
13
8
|
ddt!=1.4.3,>=1.1.1
|
|
9
|
+
mock
|
|
14
10
|
pre-commit
|
|
15
11
|
pytest>=7.3.1
|
|
16
12
|
pytest-cov
|
|
@@ -21,9 +17,6 @@ pytest-sugar
|
|
|
21
17
|
[test:python_version < "3.11"]
|
|
22
18
|
typing-extensions
|
|
23
19
|
|
|
24
|
-
[test:python_version < "3.8"]
|
|
25
|
-
mock
|
|
26
|
-
|
|
27
20
|
[test:python_version >= "3.9"]
|
|
28
21
|
mypy==1.18.2
|
|
29
22
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: GitPython
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.2.0
|
|
4
4
|
Summary: GitPython is a Python library used to interact with Git repositories
|
|
5
|
-
|
|
6
|
-
Author: Sebastian Thiel, Michael Trier
|
|
7
|
-
Author-email: byronimo@gmail.com, mtrier@gmail.com
|
|
5
|
+
Author-email: Sebastian Thiel <byronimo@gmail.com>, Michael Trier <mtrier@gmail.com>
|
|
8
6
|
License: BSD-3-Clause
|
|
7
|
+
Project-URL: Source code, https://github.com/gitpython-developers/GitPython
|
|
8
|
+
Project-URL: Documentation, https://gitpython.readthedocs.io/en/stable/
|
|
9
|
+
Keywords: git
|
|
9
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
11
|
Classifier: Environment :: Console
|
|
11
12
|
Classifier: Intended Audience :: Developers
|
|
@@ -16,7 +17,6 @@ Classifier: Operating System :: MacOS :: MacOS X
|
|
|
16
17
|
Classifier: Typing :: Typed
|
|
17
18
|
Classifier: Programming Language :: Python
|
|
18
19
|
Classifier: Programming Language :: Python :: 3
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.8
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.9
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.10
|
|
@@ -25,7 +25,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
25
25
|
Classifier: Programming Language :: Python :: 3.13
|
|
26
26
|
Classifier: Programming Language :: Python :: 3.14
|
|
27
27
|
Classifier: Programming Language :: Python :: 3.15
|
|
28
|
-
Requires-Python: >=3.
|
|
28
|
+
Requires-Python: >=3.8
|
|
29
29
|
Description-Content-Type: text/markdown
|
|
30
30
|
License-File: LICENSE
|
|
31
31
|
License-File: AUTHORS
|
|
@@ -35,7 +35,7 @@ Provides-Extra: test
|
|
|
35
35
|
Requires-Dist: coverage[toml]; extra == "test"
|
|
36
36
|
Requires-Dist: basedpyright==1.39.9; (python_version >= "3.9" and sys_platform != "cygwin") and extra == "test"
|
|
37
37
|
Requires-Dist: ddt!=1.4.3,>=1.1.1; extra == "test"
|
|
38
|
-
Requires-Dist: mock;
|
|
38
|
+
Requires-Dist: mock; extra == "test"
|
|
39
39
|
Requires-Dist: mypy==1.18.2; python_version >= "3.9" and extra == "test"
|
|
40
40
|
Requires-Dist: pre-commit; extra == "test"
|
|
41
41
|
Requires-Dist: pytest>=7.3.1; extra == "test"
|
|
@@ -44,22 +44,8 @@ Requires-Dist: pytest-instafail; extra == "test"
|
|
|
44
44
|
Requires-Dist: pytest-mock; extra == "test"
|
|
45
45
|
Requires-Dist: pytest-sugar; extra == "test"
|
|
46
46
|
Requires-Dist: typing-extensions; python_version < "3.11" and extra == "test"
|
|
47
|
-
Provides-Extra: doc
|
|
48
|
-
Requires-Dist: sphinx<8,>=7.4.7; extra == "doc"
|
|
49
|
-
Requires-Dist: sphinx_rtd_theme; extra == "doc"
|
|
50
|
-
Requires-Dist: sphinx-autodoc-typehints; extra == "doc"
|
|
51
|
-
Dynamic: author
|
|
52
|
-
Dynamic: author-email
|
|
53
|
-
Dynamic: classifier
|
|
54
|
-
Dynamic: description
|
|
55
|
-
Dynamic: description-content-type
|
|
56
|
-
Dynamic: home-page
|
|
57
47
|
Dynamic: license
|
|
58
48
|
Dynamic: license-file
|
|
59
|
-
Dynamic: provides-extra
|
|
60
|
-
Dynamic: requires-dist
|
|
61
|
-
Dynamic: requires-python
|
|
62
|
-
Dynamic: summary
|
|
63
49
|
|
|
64
50
|

|
|
65
51
|
[](https://readthedocs.org/projects/gitpython/?badge=stable)
|
|
@@ -107,7 +93,7 @@ GitPython needs the `git` executable to be installed on the system and available
|
|
|
107
93
|
by setting the `GIT_PYTHON_GIT_EXECUTABLE=<path/to/git>` environment variable.
|
|
108
94
|
|
|
109
95
|
- Git (1.7.x or newer)
|
|
110
|
-
- Python >= 3.
|
|
96
|
+
- Python >= 3.8
|
|
111
97
|
|
|
112
98
|
The list of dependencies are listed in [`./requirements.txt`](https://github.com/gitpython-developers/GitPython/blob/main/requirements.txt) and [`./test-requirements.txt`](https://github.com/gitpython-developers/GitPython/blob/main/test-requirements.txt).
|
|
113
99
|
The installer takes care of installing them for you.
|
|
@@ -44,7 +44,7 @@ GitPython needs the `git` executable to be installed on the system and available
|
|
|
44
44
|
by setting the `GIT_PYTHON_GIT_EXECUTABLE=<path/to/git>` environment variable.
|
|
45
45
|
|
|
46
46
|
- Git (1.7.x or newer)
|
|
47
|
-
- Python >= 3.
|
|
47
|
+
- Python >= 3.8
|
|
48
48
|
|
|
49
49
|
The list of dependencies are listed in [`./requirements.txt`](https://github.com/gitpython-developers/GitPython/blob/main/requirements.txt) and [`./test-requirements.txt`](https://github.com/gitpython-developers/GitPython/blob/main/test-requirements.txt).
|
|
50
50
|
The installer takes care of installing them for you.
|
gitpython-3.2.0/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.2.0
|
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
Changelog
|
|
3
3
|
=========
|
|
4
4
|
|
|
5
|
+
3.2.0
|
|
6
|
+
=====
|
|
7
|
+
|
|
8
|
+
Drops support for Python 3.7 (5 years after its EOL).
|
|
9
|
+
|
|
10
|
+
Security fixes for
|
|
11
|
+
|
|
12
|
+
* Deprecate the pure-Python ``GitDB`` object database backend due to security and
|
|
13
|
+
performance issues. Selecting it or a subclass through ``odbt`` now emits a
|
|
14
|
+
``DeprecationWarning``. Remove ``odbt=GitDB`` to use ``GitCmdObjectDB``, the
|
|
15
|
+
existing default, or select ``odbt=GitCmdObjectDB`` explicitly. The ``gitdb``
|
|
16
|
+
package remains a dependency for shared types and utilities.
|
|
17
|
+
* https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-gq48-pqfc-9p58
|
|
18
|
+
* https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-23mf-xhv8-69c2
|
|
19
|
+
* https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-f9j4-qggq-h239
|
|
20
|
+
* https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-w8jc-g24h-crhw
|
|
21
|
+
* https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-m64x-33q8-m5h7
|
|
22
|
+
* https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-fx3j-rwgx-fr94
|
|
23
|
+
|
|
24
|
+
If you can, also try and provide feedback on the upcoming v4 branch
|
|
25
|
+
https://github.com/gitpython-developers/GitPython/pull/2177 - patches welcome.
|
|
26
|
+
|
|
27
|
+
See the following for all changes.
|
|
28
|
+
https://github.com/gitpython-developers/GitPython/releases/tag/3.2.0
|
|
29
|
+
|
|
5
30
|
3.1.62
|
|
6
31
|
======
|
|
7
32
|
|
|
@@ -13,7 +13,7 @@ The object database implementation is optimized for handling large quantities of
|
|
|
13
13
|
Requirements
|
|
14
14
|
============
|
|
15
15
|
|
|
16
|
-
* `Python`_ >= 3.
|
|
16
|
+
* `Python`_ >= 3.8
|
|
17
17
|
* `Git`_ 1.7.0 or newer
|
|
18
18
|
It should also work with older versions, but it may be that some operations
|
|
19
19
|
involving remotes will not work as expected.
|
|
@@ -78,6 +78,12 @@ Query relevant repository paths ...
|
|
|
78
78
|
|
|
79
79
|
:class:`Heads <git.refs.head.Head>` Heads are branches in git-speak. :class:`References <git.refs.reference.Reference>` are pointers to a specific commit or to other references. Heads and :class:`Tags <git.refs.tag.TagReference>` are a kind of references. GitPython allows you to query them rather intuitively.
|
|
80
80
|
|
|
81
|
+
To obtain the current commit ID, use ``repo.head.commit.hexsha``. This works both
|
|
82
|
+
on a branch and with a detached HEAD, provided HEAD resolves to an existing commit.
|
|
83
|
+
When ``repo.head.is_detached`` is true, HEAD points directly to a commit and there
|
|
84
|
+
is no active branch: reading ``repo.head.reference`` or ``repo.active_branch``
|
|
85
|
+
raises :exc:`TypeError`. The branch examples below assume an attached HEAD.
|
|
86
|
+
|
|
81
87
|
.. literalinclude:: ../../test/test_docs.py
|
|
82
88
|
:language: python
|
|
83
89
|
:dedent: 8
|
|
@@ -152,7 +158,7 @@ Examining References
|
|
|
152
158
|
:start-after: # [2-test_references_and_objects]
|
|
153
159
|
:end-before: # ![2-test_references_and_objects]
|
|
154
160
|
|
|
155
|
-
A :class:`symbolic reference <git.refs.symbolic.SymbolicReference>`
|
|
161
|
+
A :class:`symbolic reference <git.refs.symbolic.SymbolicReference>` can point to another reference. When detached, it points directly to a commit instead. Reading its ``commit`` property resolves the commit in either state. Assigning a commit to ``reference`` detaches it; reading ``reference`` then raises :exc:`TypeError`.
|
|
156
162
|
|
|
157
163
|
.. literalinclude:: ../../test/test_docs.py
|
|
158
164
|
:language: python
|
|
@@ -507,24 +513,29 @@ Object Databases
|
|
|
507
513
|
|
|
508
514
|
The type of the database determines certain performance characteristics, such as the quantity of objects that can be read per second, the resource usage when reading large data files, as well as the average memory footprint of your application.
|
|
509
515
|
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
516
|
+
GitCmdObjectDB
|
|
517
|
+
==============
|
|
518
|
+
``GitCmdObjectDB`` is the default and recommended backend. It reads objects and
|
|
519
|
+
resolves abbreviated object IDs through persistent ``git cat-file`` processes::
|
|
513
520
|
|
|
514
|
-
repo = Repo("path/to/repo"
|
|
521
|
+
repo = Repo("path/to/repo")
|
|
522
|
+
# Equivalent explicit selection:
|
|
523
|
+
repo = Repo("path/to/repo", odbt=GitCmdObjectDB)
|
|
515
524
|
|
|
525
|
+
GitDB
|
|
526
|
+
=====
|
|
516
527
|
.. warning::
|
|
517
|
-
``GitDB``
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
slowness during tree traversal, switch to ``GitCmdObjectDB`` instead.
|
|
521
|
-
|
|
528
|
+
The pure-Python ``GitDB`` backend is deprecated due to security and performance
|
|
529
|
+
issues. Its object parsers can exhaust resources or return incorrect object
|
|
530
|
+
data when processing untrusted repositories. Do not use it for untrusted data.
|
|
522
531
|
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
532
|
+
Selecting ``odbt=GitDB`` (including a subclass) emits a ``DeprecationWarning``.
|
|
533
|
+
To migrate, remove ``odbt=GitDB`` or replace it with ``odbt=GitCmdObjectDB`` when
|
|
534
|
+
opening, initializing, or cloning a repository. The deprecated backend remains
|
|
535
|
+
available for compatibility; deprecation does not fix its parsing issues.
|
|
526
536
|
|
|
527
|
-
|
|
537
|
+
The ``gitdb`` package remains a dependency because GitPython still uses its shared
|
|
538
|
+
types and utilities.
|
|
528
539
|
|
|
529
540
|
Git Command Debugging and Customization
|
|
530
541
|
***************************************
|
|
@@ -86,7 +86,7 @@ __all__ = [
|
|
|
86
86
|
"to_hex_sha",
|
|
87
87
|
]
|
|
88
88
|
|
|
89
|
-
__version__ = '3.
|
|
89
|
+
__version__ = '3.2.0'
|
|
90
90
|
|
|
91
91
|
from typing import Any, List, Optional, Sequence, TYPE_CHECKING, Tuple, Union
|
|
92
92
|
|
|
@@ -295,6 +295,6 @@ def refresh(path: Optional[PathLike] = None) -> None:
|
|
|
295
295
|
try:
|
|
296
296
|
refresh()
|
|
297
297
|
except Exception as _exc:
|
|
298
|
-
raise ImportError("Failed to initialize: {
|
|
298
|
+
raise ImportError(f"Failed to initialize: {_exc}") from _exc
|
|
299
299
|
|
|
300
300
|
# } END initialize git executable path
|