summaryrefslogtreecommitdiff
path: root/lib/git/repo.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-19 21:32:34 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-19 21:32:34 +0200
commit985093bae160419782b3d3cb9151e2e58625fd52 (patch)
tree2f19b97289d9d0af2eeea894dcc1f51e627261cf /lib/git/repo.py
parent8f42db54c6b2cfbd7d68e6d34ac2ed70578402f7 (diff)
parent53d26977f1aff8289f13c02ee672349d78eeb2f0 (diff)
downloadgitpython-985093bae160419782b3d3cb9151e2e58625fd52.tar.gz
Merge branch 'remotes' into improvements
* remotes: remote: added tests for creation and removal, finishing the remote interface remote: base tests succeed now config: fixed serious issues that would cause it to see initial tabs as continuation lines - this leads to very incorrect results when parsing git config files. Now the complete reading is overridden to make it work as there was no other way Added configuration access including tests to remote Added remote module and test cases - about to implement remote option handling added initial frame for remote handling- remotes are somewhat related to either parsing the command output or to reading the repo configuration which would be faster
Diffstat (limited to 'lib/git/repo.py')
-rw-r--r--lib/git/repo.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/git/repo.py b/lib/git/repo.py
index c53a4d9b..d5cc9782 100644
--- a/lib/git/repo.py
+++ b/lib/git/repo.py
@@ -17,6 +17,7 @@ from actor import Actor
from refs import *
from objects import *
from config import GitConfigParser
+from remote import Remote
class Repo(object):
"""
@@ -107,6 +108,13 @@ class Repo(object):
``git.Head[]``
"""
return Head.list_items(self)
+
+ @property
+ def remotes(self):
+ """
+ A list of Remote objects allowing to access and manipulate remotes
+ """
+ return Remote.list_items(self)
# alias heads
branches = heads
@@ -141,7 +149,7 @@ class Repo(object):
elif config_level == "global":
return os.path.expanduser("~/.gitconfig")
elif config_level == "repository":
- return "%s/config" % self.git.git_dir
+ return "%s/config" % self.path
raise ValueError( "Invalid configuration level: %r" % config_level )