You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlike the other attributes in a Commit object, the attribute gpgsig is always set by the Commit constructor. If you look at all the previous lines, they are guarded with a if X is not None:.
This unfortunately causes the bug that if gpgsig is the first attribute read, it returns None even when the commit is signed. For example, if before reading gpgsig, we read another attribute like message, reading gpgsig will work. This made the bug hard to discover and debug. 😞
I believe that this bug can be fixed just by adding a if gpgsig is not None: conditional in the line above.
The text was updated successfully, but these errors were encountered:
Unlike the other attributes in a Commit object, the attribute
gpgsig
is always set by theCommit
constructor. If you look at all the previous lines, they are guarded with aif X is not None:
.Since the Commit object can then be created with
gpgsig = None
, this causes the__getattr__ in LazyMixin
to not be called, which is responsible for calling_set_cache_
which ultimately calls_deserialize
to populategpgsig
.This unfortunately causes the bug that if
gpgsig
is the first attribute read, it returnsNone
even when the commit is signed. For example, if before readinggpgsig
, we read another attribute likemessage
, readinggpgsig
will work. This made the bug hard to discover and debug. 😞I believe that this bug can be fixed just by adding a
if gpgsig is not None:
conditional in the line above.The text was updated successfully, but these errors were encountered: