From 3d3a24b22d340c62fafc0e75a349c0ffe34d99d7 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 23 Oct 2009 11:07:04 +0200 Subject: Added repo.index property including simple test, and additional ideas in the TODO list --- lib/git/repo.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/git/repo.py') diff --git a/lib/git/repo.py b/lib/git/repo.py index 94555a31..569d6f1b 100644 --- a/lib/git/repo.py +++ b/lib/git/repo.py @@ -14,6 +14,7 @@ from errors import InvalidGitRepositoryError, NoSuchPathError from cmd import Git from actor import Actor from refs import * +from index import IndexFile from objects import * from config import GitConfigParser from remote import Remote @@ -145,6 +146,14 @@ class Repo(object): # alias heads branches = heads + + @property + def index(self): + """ + Returns + IndexFile representing this repository's index. + """ + return IndexFile(self) @property def head(self): -- cgit v1.2.1