summaryrefslogtreecommitdiff
path: root/git/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* Name top-level exceptions as private variablesChristopher Head2023-05-151-4/+4
| | | | | | `exc` is private to the module. Naming it `_exc` eliminates a collision with the `exc` submodule (one which would not be observable at runtime due to the import failing, but which confuses linters).
* reformat according to 'black' configuration file.Sebastian Thiel2022-05-181-5/+1
|
* 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-181-24/+30
| | | | | That way people who use it won't be deterred, while it unifies style everywhere.
* Revert "Replace wildcard imports with concrete imports"Trym Bremnes2021-10-031-11/+11
| | | | | | | | | | | 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-11/+11
| | | | | | | All `from <module> import *` has now been replaced by `from <module> import X, Y, ...`. Contributes to #1349
* add initial types to remote.pyyobmod2021-05-031-4/+5
|
* add types to git.util and git.__init__yobmod2021-03-011-3/+6
|
* Do not break convention when updating sys.pathXavier Verges2020-10-051-1/+1
|
* Fix exception causes all over the codebaseRam Rachum2020-06-141-4/+4
|
* Test for PyOxidizer and avoid trying to use __file__ if presentSebastian Thiel2020-04-111-1/+1
| | | | Fixes #1002
* Fix exception on import in MacOSErik Johnson2018-06-051-1/+4
| | | | | | | | | This is related to my fix in #658. Apparently, MacOS adds a git executable that is just a stub which displays an error. This gets past the try/except I added in #658, and allows all of the GitPython components to be imported, but since the executable is not *actually* git, it results in an exception when ``refresh()`` attemepts to run a ``git version``.
* Merge branch 'master' into adding_setup_for_git_executableSebastian Thiel2017-09-281-17/+20
|\
| * Fix GitError being raised in initial `import git`Erik Johnson2017-08-101-17/+20
| | | | | | | | | | | | This catches any raise of one of the custom exceptions defined in `git.exc` during the imports in the dunder init, and raises an `ImportError` in those cases.
* | Minor additional cleanupOdegard, Ken2017-07-251-0/+7
| | | | | | | | | | | | | | Added additional information in the import warning/error that tells the user how to silence the warning/error. Also added a GIT_OK variable that allows for a quick check whether the refresh has succeeded instead of needing to test an actual git command.
* | Renamed refresh to setup and removed alias function & added unittestOdegard, Ken2017-07-091-6/+3
| | | | | | | | | | | | Renamed to simplify and avoid issue with nose tests trying to use `setup` as a setup for testing. Unittest implements basic test for refreshing with a bad git path versus a good git path.
* | Moved setup function into top level __init__Odegard, Ken2017-07-091-0/+17
|/ | | | | | | | Discovered that the remote module also relies on the git executable as such it also needs to be “refreshed” anytime the git executable is updated or changed. This was best solved by moving the setup function into the top level __init__ where the setup simply calls git.cmd.Git.refresh and git.remote.FetchInfo.refresh.
* feat(util): export rmtree() to facilitate del of tmp-repos on WindowsKostis Anagnostopoulos2016-12-081-1/+2
| | | Usecase described in #553
* src: import os.path as ospKostis Anagnostopoulos2016-10-161-2/+5
|
* src: No PyDev warningsKostis Anagnostopoulos2016-10-041-12/+12
| | | | | | | | + Mark all unused vars and other non-pep8 (PyDev) warnings + test_utils: + enable & fix forgotten IterableList looped path. + unittestize all assertions. + remote: minor fix progress dispatching unknown err-lines
* fix(externals): init external in dev mode onlySebastian Thiel2015-04-071-1/+2
| | | | | Previously it would always adjust your system path, which is bad behaviour.
* Removed unnecessary (non-gitpython) tests and fixed flake80.3.3Sebastian Thiel2015-01-041-0/+1
|
* Applied autopep8Sebastian Thiel2014-11-191-7/+7
| | | | | Commandline was autopep8 -j 8 --max-line-length 120 --in-place --recursive --exclude "*gitdb*,*async*" git/
* pep8 linting (trailing whitespace)Antoine Musso2014-11-161-2/+2
| | | | W291 trailing whitespace
* pep8 linting (whitespace before/after)Antoine Musso2014-11-161-2/+2
| | | | | | | | | | | | | E201 whitespace after '(' E202 whitespace before ')' E203 whitespace before ':' E225 missing whitespace around operator E226 missing whitespace around arithmetic operator E227 missing whitespace around bitwise or shift operator E228 missing whitespace around modulo operator E231 missing whitespace after ',' E241 multiple spaces after ',' E251 unexpected spaces around keyword / parameter equals
* pep8 linting (whitespaces)Antoine Musso2014-11-161-3/+2
| | | | | | | | | | | W191 indentation contains tabs E221 multiple spaces before operator E222 multiple spaces after operator E225 missing whitespace around operator E271 multiple spaces after keyword W292 no newline at end of file W293 blank line contains whitespace W391 blank line at end of file
* tabs to 4 spaces - this won't make integrating the patches easier, but it's ↵Sebastian Thiel2014-02-091-16/+16
| | | | probably a good idea to go a little more pep8 (and fix sins of my youth ;) )
* Fixed import of gitdb, keeping changed gitdb commit so that the submodule ↵Sebastian Thiel2010-12-011-1/+7
| | | | | | tests may work. Switched gitdb submodule to new github url
* Moved everything into the git subdirectory - some tests still need to be ↵Sebastian Thiel2010-11-251-0/+48
adjusted