diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-07-07 17:30:47 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-07-07 17:30:47 +0200 |
commit | bc31651674648f026464fd4110858c4ffeac3c18 (patch) | |
tree | d52bd46d5a2c00c6c852148dba16a29d31ae3a5c /lib/git/index/base.py | |
parent | f068cdc5a1a13539c4a1d756ae950aab65f5348b (diff) | |
download | gitpython-bc31651674648f026464fd4110858c4ffeac3c18.tar.gz |
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
Diffstat (limited to 'lib/git/index/base.py')
-rw-r--r-- | lib/git/index/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
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): |