-
I am trying to add an attribute to a
and I'm getting this error:
I understand these objects are wrappers, but can you provide some more info on whether what I'm trying to do is possible? I am trying to reuse these commit objects for a later purpose by inserting info in them. If this is not possible, I will have to make copies of the pertinent commit info I need into new objects and use those. I thought I'd check here is the former was possible using GitPython primitives. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Sorry for the late response. I believe the issue stems for To workaround that, one could store the commit in your own object, and attach any attribute you want to that. Alternatively, one could map additional data to each commit, using a separate dictionary, depending on the actual requirements. Please note that even though I am closing this issue, you are welcome to keep posting comments or follow-up questions. |
Beta Was this translation helpful? Give feedback.
Sorry for the late response. I believe the issue stems for
__slots__
being used in most objects whenever possible, which means these objects don't actually have adict
for storing properties. Instead, they are stored in a more efficient data structure, saving memory at the expense of flexibility.To workaround that, one could store the commit in your own object, and attach any attribute you want to that. Alternatively, one could map additional data to each commit, using a separate dictionary, depending on the actual requirements.
Please note that even though I am closing this issue, you are welcome to keep posting comments or follow-up questions.