From 9059525a75b91e6eb6a425f1edcc608739727168 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 6 Jul 2010 20:21:52 +0200 Subject: Made repo.py a package to allow better localization of functions and utilities - the repo module got rather large --- lib/git/index/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/git/index') diff --git a/lib/git/index/__init__.py b/lib/git/index/__init__.py index 13f874b0..fe4a7f59 100644 --- a/lib/git/index/__init__.py +++ b/lib/git/index/__init__.py @@ -1,4 +1,4 @@ -"""Initialize the index module""" +"""Initialize the index package""" from base import * from typ import * \ No newline at end of file -- cgit v1.2.3 From bc31651674648f026464fd4110858c4ffeac3c18 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 7 Jul 2010 17:30:47 +0200 Subject: Adjusted previous object creators to use the rev_parse method directly. rev_parse could be adjusted not to return Objects anymore, providing better performance for those who just want a sha only. On the other hand, the method is high-level and should be convenient to use as well, its a starting point for more usually, hence its unlikely to call it in tight loops --- lib/git/index/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/git/index') diff --git a/lib/git/index/base.py b/lib/git/index/base.py index 4b3197a2..0f02352f 100644 --- a/lib/git/index/base.py +++ b/lib/git/index/base.py @@ -1122,7 +1122,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): # item. Handle existing -R flags properly. Transform strings to the object # so that we can call diff on it if isinstance(other, basestring): - other = Object.new(self.repo, other) + other = self.repo.rev_parse(other) # END object conversion if isinstance(other, Object): -- cgit v1.2.3