summaryrefslogtreecommitdiff
path: root/lib/git/repo.py
diff options
context:
space:
mode:
authorDavid Aguilar <davvid@gmail.com>2008-06-12 02:57:00 -0700
committerDavid Aguilar <davvid@gmail.com>2008-06-12 02:57:00 -0700
commit52654c0216dcbe3fa2d9afb1de12c65d18f6a7a4 (patch)
treea24aac921256040e6243a6352e95228bb921a33d /lib/git/repo.py
parentc5083752d5d02d6c46bc2f18ba53a28d119af5b9 (diff)
downloadgitpython-52654c0216dcbe3fa2d9afb1de12c65d18f6a7a4.tar.gz
repo: these changes make Govind's latest changes pass the test cases
Signed-off-by: David Aguilar <davvid@gmail.com>
Diffstat (limited to 'lib/git/repo.py')
-rw-r--r--lib/git/repo.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/git/repo.py b/lib/git/repo.py
index 72291dc9..8b519c1c 100644
--- a/lib/git/repo.py
+++ b/lib/git/repo.py
@@ -27,9 +27,14 @@ class Repo(object):
Returns
``GitPython.Repo``
"""
+ if not os.path.exists(path):
+ raise NoSuchPathError(path)
+
self.git = Git(path)
- epath = self.git.get_work_tree()
self.path = self.git.get_git_dir()
+ if not self.path:
+ raise InvalidGitRepositoryError(path)
+ epath = self.git.get_work_tree()
if os.path.exists(os.path.join(epath, '.git')):
self.bare = False