summaryrefslogtreecommitdiff
path: root/git
Commit message (Collapse)AuthorAgeFilesLines
* Low risk ReDoS vulnfixtheworstcomrade2022-02-181-1/+1
| | | | https://huntr.dev/bounties/8549d81f-dc45-4af7-9f2a-2d70752d8524/
* Let index.commit refer to correct method for parameter information (#1407)Sebastian Thiel2022-02-031-1/+1
|
* set unassigned stdin to improve pyinstaller compatibilitysmokephil2022-01-211-2/+3
| | | | To create a window application with pyinstaller, all suprocess input and output streams must be assigned and must not be None. https://stackoverflow.com/a/51706087/7076612
* Use bash to open extensionless hooks on windowsDavid Briscoe2022-01-141-1/+14
| | | | | | | | | | | | | | | Fix #971. Partly resolve #703. If the hook doesn't have a file extension, then Windows won't know how to run it and you'll get "[WinError 193] %1 is not a valid Win32 application". It's very likely that it's a shell script of some kind, so use bash.exe (commonly installed via Windows Subsystem for Linux). We don't want to run all hooks with bash because they could be .bat files. Update tests to get several hook ones working. More work necessary to get commit-msg hook working. The hook writes to the wrong file because it's not using forward slashes in the path: C:\Users\idbrii\AppData\Local\Temp\bare_test_commit_msg_hook_successy5fo00du\CUsersidbriiAppDataLocalTempbare_test_commit_msg_hook_successy5fo00duCOMMIT_EDITMSG
* 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.
* import unittest adds 0.250s to script launch timewonder-mice2022-01-121-1/+1
| | | This should not be imported at root level, since it adds a lot of initialization overhead without need.
* Assure index file descriptor is closed after reader (#1394) (#1395)Sebastian Thiel2022-01-101-1/+4
| | | | A regression that was introduced with d79d20d.
* Fix doc string error in Objects.CommitTakuya Kitazawa2022-01-101-2/+2
|
* Revert "Use NUL character to extract meta and path from git diff"Sebastian Thiel2022-01-071-3/+3
| | | | This reverts commit 01f09888208341876d1480bd22dc8f4107c100f1.
* 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.
* Use NUL character to extract meta and path from git diffNHanser2022-01-071-3/+3
| | | Use NUL character instead of semicolon to extract meta and path. Avoid errors in during git diff when dealing with filenames containing semicolons
* Avoid taking a lock for readingSebastian Thiel2022-01-072-15/+2
| | | | | | | This isn't needed as git will replace this file atomicially, hence we always see a fully written file when reading. Only when writing we need to obtain a lock.
* Extend IterableList[PushInfo] instead of IterableListSjoerd Langkemper2021-11-131-17/+16
|
* Specify type for PushInfoList.errorSjoerd Langkemper2021-11-131-1/+1
|
* Fix type handing on PushInfoListSjoerd Langkemper2021-11-131-3/+4
|
* Rename exception to error, raise_on_error to raise_if_errorSjoerd Langkemper2021-11-131-5/+5
|
* Let remote.push return a PushInfoListSjoerd Langkemper2021-11-131-3/+20
| | | | | | | List-like, so that it's backward compatible. But it has a new method raise_on_error, that throws an exception if anything failed to push. Related to #621
* Revert "Replace wildcard imports with concrete imports"Trym Bremnes2021-10-035-27/+28
| | | | | | | | | | | 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-015-28/+27
| | | | | | | All `from <module> import *` has now been replaced by `from <module> import X, Y, ...`. Contributes to #1349
* Fix typing issues with delete_head and Remote.addRuss Allbery2021-09-204-4/+11
| | | | | | | | | | | | | | delete_head and Head.delete historically accept either Head objects or a str name of a head. Adjust the typing to match. This unfortunately requires suppressing type warnings in the signature of RemoteReference.delete, since it inherits from Head but does not accept str (since it needs access to the richer data of RemoteReference). Using assignment to make add an alias for create unfortunately confuses mypy, since it loses track of the fact that it's a classmethod and starts treating it like a staticmethod. Replace with a stub wrapper instead.
* Add a way to force status codes inside AutoInterrupt._terminate, and let ↵sroet2021-09-181-7/+12
| | | | tests use it
* fix typo'ssroet2021-09-181-1/+1
|
* make flake8 and mypy happysroet2021-09-181-10/+16
|
* update tests and add a comment about different behaviour of 'push' vs 'fetch'sroet2021-09-181-0/+2
|
* reuse kill_after_timeout kwargsroet2021-09-182-31/+71
|
* update docstringsroet2021-09-181-1/+1
|
* reset default timeout to Nonesroet2021-09-182-6/+6
|
* allow for timeout propagationsroet2021-09-181-9/+15
|
* change default fetch timeout to 60 ssroet2021-09-181-1/+1
|
* Merge pull request #1318 from Yobmod/mainDominic2021-09-095-29/+43
|\ | | | | General fixes for next release
| * Update changelog and versionYobmod2021-08-091-0/+2
| |
| * 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-0/+0
| |
| * type fixYobmod2021-08-081-0/+944
| |
| * add type check to conf_encoding (in thoery could be bool or int)Yobmod2021-08-084-959/+6
| |
| * Merge branch 'master' of https://github.com/Yobmod/GitPython into mainyobmod2021-08-081-14/+28
| |\
| | * fix setup.py classifiers, improvefnmatchprocess handler typesyobmod2021-08-081-14/+28
| | |
* | | Assure CWD is readable after acquiring itSebastian Thiel2021-09-051-0/+2
| | | | | | | | | | | | Fixes #1334
* | | Add encoding to utf-8 for fetch_info_lines;f1000242021-08-241-2/+2
| | | | | | | | | | | | Add encoding to utf-8 for fetch_head_info;
* | | Use the Git class type definition within Repo classmethodsMichael Mulich2021-08-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the GitCommandWrapperType definition to be used within the Repo classmethods. This change follows the intended purpose as stated in the code, "Subclasses may easily bring in their own custom types by placing a constructor or type here." The usecase that prompted this change has to do with `GIT_SSH_COMMAND`. The goal is to setup a custom `Git` class with knowledge of the value, something like as follows ```python from git import Git as BaseGit, Repo as BaseRepo class Git(BaseGit): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # For example, assign the SSH command using the current flask # app's configured setting. self.update_environment(GIT_SSH_COMMAND=current_app.config['GIT_SSH_COMMAND']) class Repo(BaseRepo): GitCommandWrapperType = _Git ``` With this change, the above example will allow the developer to use `Repo.clone_from(...)` with the indended outcome. Otherwise the developer will have two differing result when using `Repo(...)` vs `Repo.clone_from(...)`.
* | | Don't fail on import if the working dir isn't valid (#1319)Sebastian Thiel2021-08-121-1/+4
|/ /
* | Merge branch 'gitpython-developers:main' into patch-1Eric Wieser2021-08-031-2/+2
|\ \
| * | Fix trailing whitespace and incorrect overloadEric Wieser2021-08-031-2/+2
| | |
* | | Use get instead of get_valueEric Wieser2021-08-031-1/+1
| | | | | | | | | This won't try and do something silly like convert `username=1` to a number.
* | | Merge branch 'main' into patch-1Eric Wieser2021-08-0317-168/+193
|\ \ \ | |/ /
| * | Add overload to get_value()Dominic2021-08-031-6/+5
| |/