diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-08-29 16:19:52 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-08-29 16:20:28 +0200 |
commit | e8590424997ab1d578c777fe44bf7e4173036f93 (patch) | |
tree | b65d2b954c878ca11439f94f42e52b40437701c7 /git/exc.py | |
parent | 6eb3af27464ffba83e3478b0a0c8b1f9ff190889 (diff) | |
download | gitpython-e8590424997ab1d578c777fe44bf7e4173036f93.tar.gz |
fix(repo): fail loudly if worktrees are used
As GitPython is in maintenance mode, there will be no new features.
However, I believe it's good idea to explicitly state we do not support
certain things if this is the case.
Therefore, when worktrees are encountered, we will throw an specific
exception to indicate that.
The current implementation is hacky to speed up development,
and increases the risk of failing due to false-positive worktree
directories.
Related to #344
Diffstat (limited to 'git/exc.py')
-rw-r--r-- | git/exc.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -14,6 +14,10 @@ class InvalidGitRepositoryError(Exception): """ Thrown if the given repository appears to have an invalid format. """ +class WorkTreeRepositoryUnsupported(InvalidGitRepositoryError): + """ Thrown to indicate we can't handle work tree repositories """ + + class NoSuchPathError(OSError): """ Thrown if a path could not be access by the system. """ |