Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gitpython-developers/GitPython
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.1.27
Choose a base ref
...
head repository: gitpython-developers/GitPython
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.1.29
Choose a head ref
Loading
Showing with 5,643 additions and 3,767 deletions.
  1. +4 −1 .flake8
  2. +6 −0 .github/dependabot.yml
  3. +57 −0 .github/workflows/cygwin-test.yml
  4. +5 −2 .github/workflows/pythonpackage.yml
  5. +5 −0 AUTHORS
  6. +1 −1 Makefile
  7. +6 −1 README.md
  8. +1 −1 VERSION
  9. +13 −6 doc/source/changes.rst
  10. +44 −46 doc/source/conf.py
  11. +5 −5 doc/source/tutorial.rst
  12. +26 −24 git/__init__.py
  13. +300 −215 git/cmd.py
  14. +22 −15 git/compat.py
  15. +125 −76 git/config.py
  16. +4 −7 git/db.py
  17. +208 −122 git/diff.py
  18. +49 −30 git/exc.py
  19. +1 −1 git/ext/gitdb
  20. +256 −165 git/index/base.py
  21. +84 −66 git/index/fun.py
  22. +54 −28 git/index/typ.py
  23. +20 −12 git/index/util.py
  24. +3 −3 git/objects/__init__.py
  25. +39 −24 git/objects/base.py
  26. +4 −3 git/objects/blob.py
  27. +218 −119 git/objects/commit.py
  28. +42 −27 git/objects/fun.py
  29. +239 −135 git/objects/submodule/base.py
  30. +120 −56 git/objects/submodule/root.py
  31. +21 −13 git/objects/submodule/util.py
  32. +32 −18 git/objects/tag.py
  33. +78 −54 git/objects/tree.py
  34. +188 −128 git/objects/util.py
  35. +36 −21 git/refs/head.py
  36. +62 −48 git/refs/log.py
  37. +31 −19 git/refs/reference.py
  38. +12 −7 git/refs/remote.py
  39. +132 −81 git/refs/symbolic.py
  40. +29 −17 git/refs/tag.py
  41. +278 −186 git/remote.py
  42. +340 −208 git/repo/base.py
  43. +69 −49 git/repo/fun.py
  44. +37 −18 git/types.py
  45. +248 −162 git/util.py
  46. +5 −1 pyproject.toml
  47. +1 −5 requirements-dev.txt
  48. +15 −17 setup.py
  49. +4 −0 test-requirements.txt
  50. +1 −1 test/fixtures/diff_index_patch
  51. +1 −1 test/fixtures/diff_p
  52. +1 −1 test/fixtures/git_config
  53. +1 −1 test/fixtures/rev_list_bisect_all
  54. +1 −2 test/lib/__init__.py
  55. +73 −41 test/lib/helper.py
  56. +14 −18 test/performance/lib.py
  57. +34 −15 test/performance/test_commit.py
  58. +24 −12 test/performance/test_odb.py
  59. +53 −32 test/performance/test_streams.py
  60. +0 −1 test/test_actor.py
  61. +22 −29 test/test_base.py
  62. +3 −4 test/test_blob.py
  63. +32 −0 test/test_blob_filter.py
  64. +7 −4 test/test_clone.py
  65. +130 −81 test/test_commit.py
  66. +151 −124 test/test_config.py
  67. +1 −2 test/test_db.py
  68. +128 −95 test/test_diff.py
  69. +176 −149 test/test_docs.py
  70. +48 −36 test/test_exc.py
  71. +47 −41 test/test_fun.py
  72. +83 −82 test/test_git.py
  73. +137 −120 test/test_index.py
  74. +41 −16 test/test_installation.py
  75. +12 −19 test/test_reflog.py
  76. +75 −50 test/test_refs.py
  77. +98 −72 test/test_remote.py
  78. +261 −179 test/test_repo.py
  79. +10 −14 test/test_stats.py
  80. +261 −182 test/test_submodule.py
  81. +18 −16 test/test_tree.py
  82. +118 −83 test/test_util.py
  83. +2 −1 test/tstrunner.py
5 changes: 4 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -25,11 +25,14 @@ ignore = E265,E266,E731,E704,
A,
D,
RST, RST3
max-line-length = 120

exclude = .tox,.venv,build,dist,doc,git/ext/,test

rst-roles = # for flake8-RST-docstrings
attr,class,func,meth,mod,obj,ref,term,var # used by sphinx

min-python-version = 3.7.0

# for `black` compatibility
max-line-length = 120
extend-ignore = E203,W503
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
57 changes: 57 additions & 0 deletions .github/workflows/cygwin-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: test-cygwin

on:
push:
branches:
main
pull_request:
branches:
main

jobs:
build:
runs-on: windows-latest
env:
CHERE_INVOKING: 1
SHELLOPTS: igncr
TMP: "/tmp"
TEMP: "/tmp"

steps:
- name: Force LF line endings
run: git config --global core.autocrlf input
- uses: actions/checkout@v3
with:
fetch-depth: 9999
- uses: cygwin/cygwin-install-action@v2
with:
packages: python39 python39-pip python39-virtualenv git
- name: Tell git to trust this repo
shell: bash.exe -eo pipefail -o igncr "{0}"
run: /usr/bin/git config --global --add safe.directory $(pwd)
- name: Install dependencies and prepare tests
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
set -x
/usr/bin/python -m pip install --upgrade pip setuptools wheel
/usr/bin/python --version; /usr/bin/git --version
/usr/bin/git submodule update --init --recursive
/usr/bin/git fetch --tags
/usr/bin/python -m pip install -r requirements.txt
/usr/bin/python -m pip install -r test-requirements.txt
TRAVIS=yes ./init-tests-after-clone.sh
/usr/bin/git config --global user.email "travis@ci.com"
/usr/bin/git config --global user.name "Travis Runner"
# If we rewrite the user's config by accident, we will mess it up
# and cause subsequent tests to fail
cat test/fixtures/.gitconfig >> ~/.gitconfig
- name: Lint with flake8
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
set -x
/usr/bin/python -m flake8
- name: Test with pytest
shell: bash.exe -eo pipefail -o igncr "{0}"
run: |
/usr/bin/python -m pytest
continue-on-error: false
7 changes: 5 additions & 2 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -9,6 +9,9 @@ on:
pull_request:
branches: [ main ]

permissions:
contents: read

jobs:
build:

@@ -18,11 +21,11 @@ jobs:
python-version: [3.7, 3.7.5, 3.7.12, 3.8, 3.8.0, 3.8.11, 3.8, 3.9, 3.9.0, 3.9.7, "3.10"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 9999
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and prepare tests
5 changes: 5 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -45,4 +45,9 @@ Contributors are:
-Alba Mendez <me _at_ alba.sh>
-Robert Westman <robert _at_ byteflux.io>
-Hugo van Kemenade
-Hiroki Tokunaga <tokusan441 _at_ gmail.com>
-Julien Mauroy <pro.julien.mauroy _at_ gmail.com>
-Patrick Gerard
-Luke Twist <itsluketwist@gmail.com>
-Joseph Hale <me _at_ jhale.dev>
Portions derived from other open source works and are clearly marked.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -17,4 +17,4 @@ release: clean
force_release: clean
git push --tags origin main
python3 setup.py sdist bdist_wheel
twine upload -s -i 27C50E7F590947D7273A741E85194C08421980C9 dist/*
twine upload dist/*
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -149,7 +149,12 @@ Please have a look at the [contributions file][contributing].
incrementing the patch level, and possibly by appending `-dev`. Probably you
want to `git push` once more.

### How to verify a release
### How to verify a release (DEPRECATED)

Note that what follows is deprecated and future releases won't be signed anymore.
More details about how it came to that can be found [in this issue](https://github.com/gitpython-developers/gitdb/issues/77).

----

Please only use releases from `pypi` as you can verify the respective source
tarballs.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.27
3.1.29
19 changes: 13 additions & 6 deletions doc/source/changes.rst
Original file line number Diff line number Diff line change
@@ -2,11 +2,16 @@
Changelog
=========

3.1.28
3.1.29
======

- Fix a vulenerability that could cause great slowdowns when encountering long remote path names
when pulling/fetching.
- Make the git.__version__ re-appear.

See the following for all changes.
https://github.com/gitpython-developers/gitpython/milestone/59?closed=1

3.1.28
======

See the following for all changes.
https://github.com/gitpython-developers/gitpython/milestone/58?closed=1
@@ -15,6 +20,8 @@ https://github.com/gitpython-developers/gitpython/milestone/58?closed=1
======

- Reduced startup time due to optimized imports.
- Fix a vulenerability that could cause great slowdowns when encountering long remote path names
when pulling/fetching.

See the following for all changes.
https://github.com/gitpython-developers/gitpython/milestone/57?closed=1
@@ -76,7 +83,7 @@ https://github.com/gitpython-developers/gitpython/milestone/53?closed=1

- Make Protocol classes ABCs at runtime due to new behaviour/bug in 3.9.7 & 3.10.0-rc1

- Remove use of typing.TypeGuard until later release, to allow dependant libs time to update.
- Remove use of typing.TypeGuard until later release, to allow dependent libs time to update.

- Tracking issue: https://github.com/gitpython-developers/GitPython/issues/1095

@@ -141,7 +148,7 @@ https://github.com/gitpython-developers/gitpython/milestone/48?closed=1
3.1.15 (YANKED)
===============

* add deprectation warning for python 3.5
* add deprecation warning for python 3.5

See the following for details:
https://github.com/gitpython-developers/gitpython/milestone/47?closed=1
@@ -602,7 +609,7 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not
- Renamed `ignore_tree_extension_data` keyword argument in `IndexFile.write(...)` to `ignore_extension_data`
* If the git command executed during `Remote.push(...)|fetch(...)` returns with an non-zero exit code and GitPython didn't
obtain any head-information, the corresponding `GitCommandError` will be raised. This may break previous code which expected
these operations to never raise. However, that behavious is undesirable as it would effectively hide the fact that there
these operations to never raise. However, that behaviour is undesirable as it would effectively hide the fact that there
was an error. See `this issue <https://github.com/gitpython-developers/GitPython/issues/271>`__ for more information.

* If the git executable can't be found in the PATH or at the path provided by `GIT_PYTHON_GIT_EXECUTABLE`, this is made
Loading