diff options
| author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-15 16:53:12 +0100 |
|---|---|---|
| committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-15 16:53:12 +0100 |
| commit | 00ce31ad308ff4c7ef874d2fa64374f47980c85c (patch) | |
| tree | 3eed99866de01d4d8e150815eff1fd16c110b473 /lib/git/objects/tag.py | |
| parent | 4d36f8ff4d1274a8815e932285ad6dbd6b2888af (diff) | |
| download | GitPython-00ce31ad308ff4c7ef874d2fa64374f47980c85c.tar.gz GitPython-00ce31ad308ff4c7ef874d2fa64374f47980c85c.zip | |
Objects: Constructor now manually checks and sets the input arguments to the local cache - previously a procedural approach was used, which was less code, but slower too. Especially in case of CommitObjects unrolling the loop manually makes a difference.
Submodule: Implemented query methods and did a bit of testing. More is to come, but the test works for now. As special addition, the submodule implementation uses the section name as submodule ID even though it seems to be just the path. This allows to make renames easier
Diffstat (limited to 'lib/git/objects/tag.py')
| -rw-r--r-- | lib/git/objects/tag.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/git/objects/tag.py b/lib/git/objects/tag.py index ea480fc2..c7d02abe 100644 --- a/lib/git/objects/tag.py +++ b/lib/git/objects/tag.py @@ -33,7 +33,18 @@ class TagObject(base.Object): :param tagged_tz_offset: int_seconds_west_of_utc is the timezone that the authored_date is in, in a format similar to time.altzone""" super(TagObject, self).__init__(repo, binsha ) - self._set_self_from_args_(locals()) + if object is not None: + self.object = object + if tag is not None: + self.tag = tag + if tagger is not None: + self.tagger = tagger + if tagged_date is not None: + self.tagged_date = tagged_date + if tagger_tz_offset is not None: + self.tagger_tz_offset = tagger_tz_offset + if message is not None: + self.message = message def _set_cache_(self, attr): """Cache all our attributes at once""" |
