summaryrefslogtreecommitdiff
path: root/git/objects
Commit message (Collapse)AuthorAgeFilesLines
* Revert the removal of Commit.trailers property.Twist2023-04-231-0/+14
|
* Specify encoding in Commit.trailer_list.Twist2023-04-221-1/+1
|
* Update Commit.trailer_list to return tuples.Twist2023-04-221-11/+16
|
* Deprecate Commit.trailers.Twist2023-04-221-18/+0
|
* Add trailers_list and trailers_list methods to fix the commit trailers ↵Twist2023-04-211-22/+79
| | | | functionality. Update trailers tests.
* Fix timezone parsing functions for non-hour timezonesJames Cowgill2023-01-241-16/+19
| | | | | | | | The `utctz_to_altz` and `altz_to_utctz_str` functions fail to handle timezones with UTC offsets that are not a multiple of one hour. Rewrite them and add some unit tests. Fixes #630
* fix files list on file renameMatteo Croce2023-01-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GitPython parses the output of `git diff --numstat` to get the files changed in a commit. This breaks when a commit contains a file rename, because the output of `git diff` is different than expected. This is the output of a normal commit: $ git diff --numstat 8f41a390bf9a^ 8f41a390bf9a 30 5 test/test_repo.py And this a commit containing a rename: $ git diff --numstat 185d847ec764^ 185d847ec764 3 1 .github/workflows/{test_pytest.yml => Future.yml} This can be triggered by this code: for commit in repo.iter_commits(): print(commit.hexsha) for file in commit.stats.files: print(file) Which will print for the normal commit: 8f41a390bf9a54db6f85032bc56b453307b95451 'test/test_repo.py' And when there is a rename: 185d847ec7647fd2642a82d9205fb3d07ea71715 '.github/workflows/{test_pytest.yml => Future.yml}' Additionally, when a path member is removed, the file list become a list of strings, breaking even more the caller. This is in the Linux kernel tree: $ git diff --numstat db401875f438^ db401875f438 1 1 tools/testing/selftests/drivers/net/mlxsw/{spectrum-2 => }/devlink_trap_tunnel_ipip6.sh and GitPython parses it as: db401875f438168c5804b295b93a28c7730bb57a ('tools/testing/selftests/drivers/net/mlxsw/{spectrum-2 => ' '}/devlink_trap_tunnel_ipip6.sh') Fix this by pasing the --no-renames option to `git diff` which ignores renames and print the same output as if the file was deleted from the old path and created in the new one: $ git diff --numstat --no-renames 185d847ec764^ 185d847ec764 57 0 .github/workflows/Future.yml 0 55 .github/workflows/test_pytest.yml
* fix/add allow_unsafe_* params in docstrings + fix typoFC Stegerman2023-01-081-1/+7
|
* Fix Sphinx rendering errorsStephan Creutz2022-12-294-1/+7
| | | | | | | | These errors are mostly fixed by either adding blank lines or single spaces for Sphinx documentation key words. The commit solely includes documentation changes, no functional changes.
* More testsSantos Gallegos2022-12-271-3/+33
|
* Add datetime.datetime type to commit_date and author_dateSergeantMenacingGarlic2022-10-131-2/+2
|
* Use the same regex as the Actor class when determining co-authors.Twist2022-08-241-3/+3
|
* Update regex to extract the author string, and create the Actor using the ↵Twist2022-08-231-3/+3
| | | | _from_string classmethod.
* Add co_authors property to the Commit object, which parses the commit ↵Twist2022-08-221-0/+22
| | | | message for designated co-authors, include a simple test.
* can flake be tamed?black-fmtSebastian Thiel2022-05-181-0/+2
|
* reformat according to 'black' configuration file.Sebastian Thiel2022-05-188-319/+101
|
* Revert "Remove flake8 linting in favor of `black` formatting"Sebastian Thiel2022-05-181-0/+1
| | | | This reverts commit a7c5d887e943aa51f2270e517954c024a8c01500.
* Remove flake8 linting in favor of `black` formattingSebastian Thiel2022-05-181-1/+0
| | | | `flake8` seems to dislike the formatting of black.
* Run everything through 'black'Sebastian Thiel2022-05-1811-622/+1220
| | | | | That way people who use it won't be deterred, while it unifies style everywhere.
* Fix various typosluz paz2022-05-074-6/+6
| | | Found via `codespell -q 3 -S ./git/ext/gitdb,./test/fixtures/reflog_master,./test/fixtures/diff_mode_only,./test/fixtures/reflog_HEAD`
* import unittest adds 0.250s to script launch timewonder-mice2022-01-121-2/+2
| | | This should not be imported at root level, since it adds a lot of initialization overhead without need.
* Fix doc string error in Objects.CommitTakuya Kitazawa2022-01-101-2/+2
|
* Use git interpret-trailers for trailers propertyKet3r2022-01-071-17/+26
| | | | | | | The whitespace handling and trailer selection isn't very trivial or good documented. It therefore seemed easier and less error prone to just call git to parse the message for the trailers section and remove superfluos whitespaces.
* Add trailer as commit propertyPeter Kempter2022-01-071-1/+40
| | | | | | | | With the command `git interpret-trailers` git provides a way to interact with trailer lines in the commit messages that look similar to RFC 822 e-mail headers (see: https://git-scm.com/docs/git-interpret-trailers). The new property returns those parsed trailer lines from the message as dictionary.
* Revert "Replace wildcard imports with concrete imports"Trym Bremnes2021-10-031-7/+7
| | | | | | | | | | | This reverts commit 53d94b8091b36847bb9e495c76bb5a3ec2a2fdb5. The reason for the revert is that the commit in question introduced a regression where certain modules, functions and classes that were exposed before were no longer exposed. See https://github.com/gitpython-developers/GitPython/pull/1352#issuecomment-932757204 for additional information.
* Replace wildcard imports with concrete importsTrym Bremnes2021-10-011-7/+7
| | | | | | | All `from <module> import *` has now been replaced by `from <module> import X, Y, ...`. Contributes to #1349
* upgrade sphinx for 3.10 compatYobmod2021-08-091-4/+5
|
* try fix for Protocol buy in 3.10 3Yobmod2021-08-091-2/+2
|
* try fix for Protocol buy in 3.10 2Yobmod2021-08-091-1/+1
|
* try fix for Protocol buy in 3.10Yobmod2021-08-091-2/+8
|
* type fixoYobmod2021-08-081-944/+0
|
* type fixYobmod2021-08-081-0/+944
|
* add type check to conf_encoding (in thoery could be bool or int)Yobmod2021-08-081-0/+2
|
* Add __future__.annotations to repo/base.pyYobmod2021-08-021-3/+1
|
* Fix parse_date typing 7Yobmod2021-08-022-567/+3
|
* Fix parse_date typing 6Yobmod2021-08-022-1/+567
|
* Fix parse_date typing 5Yobmod2021-08-021-2/+7
|
* Fix parse_date typing 4Yobmod2021-08-021-12/+7
|
* Fix parse_date typing 3Yobmod2021-08-021-6/+4
|
* Fix parse_date typing 2Yobmod2021-08-021-1/+3
|
* Fix parse_date typingYobmod2021-08-021-3/+5
|
* increase mypy strictness (warn unused ignored and warn unreachable)Yobmod2021-08-023-5/+7
|
* increase mypy strictness (warn unused ignored)Yobmod2021-08-021-1/+1
|
* replace some TBDs wiht runtime typesYobmod2021-07-311-1/+2
|
* Add final types to submodule.pyYobmod2021-07-312-12/+13
|
* Add final types to tree.pyYobmod2021-07-311-2/+2
|
* Add final types to commit.pyYobmod2021-07-311-3/+3
|
* Add type to objects.base.new()Yobmod2021-07-311-1/+2
|
* update types submodule/root.pyDominic2021-07-311-3/+1
|
* update types submodule/base.pyDominic2021-07-311-3/+5
|