summaryrefslogtreecommitdiff
path: root/git/repo/base.py
Commit message (Collapse)AuthorAgeFilesLines
* 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(...)`.
* Improve type of repo.currently_rebasing_on()Yobmod2021-08-021-2/+2
|
* Improve type of repo.blame_incremental()Yobmod2021-08-021-9/+9
|
* Choose TypedDict!Yobmod2021-08-021-37/+32
|
* Test Dataclass in repo.base.blame() 6Yobmod2021-08-021-6/+5
|
* Test Dataclass in repo.base.blame() 5Yobmod2021-08-021-30/+37
|
* Test Dataclass in repo.base.blame() 4Yobmod2021-08-021-11/+10
|
* Test TypedDict in repo.base.blame() 1Yobmod2021-08-021-13/+14
|
* Test TypedDict in repo.base.blame() 2Yobmod2021-08-021-44/+36
|
* Test Dataclass in repo.base.blame() 3Yobmod2021-08-021-13/+14
|
* Test Dataclass in repo.base.blame() 2Yobmod2021-08-021-2/+2
|
* Test Dataclass in repo.base.blame()Yobmod2021-08-021-37/+66
|
* Test trailing comma in args (>py3.6?)Yobmod2021-08-021-3/+5
|
* Test new union syntax (Pep604)Yobmod2021-08-021-1/+1
|
* Add __future__.annotations to repo/base.pyYobmod2021-08-021-4/+5
|
* increase mypy strictness (warn unused ignored and warn unreachable)Yobmod2021-08-021-1/+0
|
* replace more TBDs wiht runtime typesYobmod2021-07-311-4/+5
|
* Add type to repo.base._to_full_tag_pathYobmod2021-07-311-6/+7
|
* Fix more missing types in Symbolic.py, cos GuthubActions pytest stuckYobmod2021-07-281-1/+2
|
* Fix some SymbolicReference typesYobmod2021-07-281-1/+1
|
* Fix SymbolicReference reference typingYobmod2021-07-281-3/+2
|
* Added support of spaces for clone multi_optionsIgor Lakhtenkov2021-07-271-1/+2
|
* Rmv with_metaclass shim, make section constraint generic wrt its ↵Yobmod2021-07-241-2/+4
| | | | configparser type
* Replace all Typeguard with cast, revert update to typing-extensions==3.10.0Yobmod2021-07-241-2/+3
|
* Change remaining type comments to py3.6+ typesYobmod2021-07-191-10/+10
|
* Make types in refs compatible with repoYobmod2021-07-191-3/+4
|
* Increase mypy strictness (no_implicit_optional & warn_redundant_casts) and ↵Yobmod2021-07-081-4/+4
| | | | fix errors
* Fix for mrepo2Yobmod2021-07-061-1/+1
|
* Add types to submodule.update()Yobmod2021-07-061-3/+6
|
* Improve BlameEntry.commit typingYobmod2021-07-051-4/+4
|
* Improve typing of config_levels, add assert_never()Yobmod2021-07-051-9/+10
|
* Add missed types to Commit, uncomment to_native_path_linux()Yobmod2021-07-011-1/+1
|
* Type Traversable.traverse() better, start types of submoduleYobmod2021-06-301-8/+8
|
* Make IterableList generic and update throughoutYobmod2021-06-241-6/+6
|
* Add types to tree.TreeYobmod2021-06-241-1/+2
|
* Update typing-extensions version in requirements.txtYobmod2021-06-231-2/+20
|
* Removes PathLike type requirement for full_tag creationRobert Westman2021-06-031-1/+1
|
* Fix flake8Sebastian Thiel2021-06-031-1/+0
|
* Fixes resolving of tag parameter for repo.tagRobert Westman2021-06-031-1/+12
| | | | | | | | I accessed private variables instead of adding getters, because other parts of the code do the same and I didn't know if there was a reason for it. E.g.: remote.py line 409: (...) RemoteReference._common_path_default (...)
* add types to index.fun.pyYobmod2021-05-171-2/+2
|
* Add initial types to IndexFile .init() to _to_relative_path()Yobmod2021-05-151-3/+3
|
* Add types to config.py CONFIG_LEVELS, MetaParserBuilder.__new__() ↵yobmod2021-05-081-2/+1
| | | | .needs_values() .set_dirty_and_flush_changes()
* flake8 fixesyobmod2021-05-081-4/+3
|
* add initial types to remote.pyyobmod2021-05-031-74/+77
|
* add types to base.py and fun.pyyobmod2021-02-281-108/+163
|
* docs: fix simple typo, repostory -> repositoryTim Gates2020-12-251-1/+1
| | | | | | There is a small typo in git/repo/base.py. Should read `repository` rather than `repostory`.
* rename sublist to subsetSagi Shadur2020-09-291-1/+1
|
* Rename get_ignored to ignored and fix the documentationSagi Shadur2020-09-291-2/+2
|
* Find paths ignored in .gitignoreSagi Shadur2020-09-291-0/+13
|
* git/repo/base.py: is_dirty(): Fix pathspec handlingArnaud Patard2020-09-281-1/+1
| | | | | | | | | | | | | It's possible to specify a pathspec (eg :!foo) to git diff/status/... but it currently fails with: git.exc.GitCommandError: Cmd('/usr/bin/git') failed due to: exit code(128) cmdline: /usr/bin/git diff --abbrev=40 --full-index --raw :!foo stderr: 'fatal: ambiguous argument ':!foo': unknown revision or path not in the working tree. Add missing '--' to the arguments to fix this ambiguity Signed-off-by: Arnaud Patard <apatard@hupstream.com>