Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork944
Description
Unlike the other attributes in a Commit object, the attributegpgsig
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 withgpgsig = 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 ifgpgsig
is thefirst 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 aif gpgsig is not None:
conditional in the line above.