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/refs.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/git/refs.py') diff --git a/lib/git/refs.py b/lib/git/refs.py index 8b773ae7..be094d01 100644 --- a/lib/git/refs.py +++ b/lib/git/refs.py @@ -208,9 +208,8 @@ class SymbolicReference(object): try: write_value = ref.commit.hexsha except AttributeError: - sha = str(ref) try: - obj = Object.new_from_sha(self.repo, hex_to_bin(sha)) + obj = self.repo.rev_parse(ref+"^{}") # optionally deref tags if obj.type != "commit": raise TypeError("Invalid object type behind sha: %s" % sha) write_value = obj.hexsha -- cgit v1.2.1