diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-11-03 16:35:33 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-11-03 16:35:33 +0100 |
commit | 3cb5ba18ab1a875ef6b62c65342de476be47871b (patch) | |
tree | d287a2fad9f87856b6937ffd4abaed66c9066da7 /lib/git/refs.py | |
parent | dbc18b92362f60afc05d4ddadd6e73902ae27ec7 (diff) | |
download | gitpython-3cb5ba18ab1a875ef6b62c65342de476be47871b.tar.gz |
object: renamed id attribute to sha as it in fact is always being rewritten as sha, even if the passed in id was a ref. This is done to assure objects are uniquely identified and will compare correctly
Diffstat (limited to 'lib/git/refs.py')
-rw-r--r-- | lib/git/refs.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/git/refs.py b/lib/git/refs.py index ddf98fc7..84347057 100644 --- a/lib/git/refs.py +++ b/lib/git/refs.py @@ -312,17 +312,17 @@ class SymbolicReference(object): if isinstance(ref, Head): write_value = "ref: %s" % ref.path elif isinstance(ref, Commit): - write_value = ref.id + write_value = ref.sha else: try: - write_value = ref.commit.id + write_value = ref.commit.sha except AttributeError: sha = str(ref) try: obj = Object.new(self.repo, sha) if obj.type != "commit": raise TypeError("Invalid object type behind sha: %s" % sha) - write_value = obj.id + write_value = obj.sha except Exception: raise ValueError("Could not extract object from %s" % ref) # END end try string @@ -428,7 +428,7 @@ class Head(Reference): >>> head.commit <git.Commit "1c09f116cbc2cb4100fb6935bb162daa4723f455"> - >>> head.commit.id + >>> head.commit.sha '1c09f116cbc2cb4100fb6935bb162daa4723f455' """ _common_path_default = "refs/heads" |