python / cherry-picker

🐍🍒⛏ Utility script for backporting/cherry-picking CPython changes from master into one of the maintenance branches.
Apache License 2.0
49 stars 39 forks source link

Remove `initial_state` as it gets out of sync with what's in .git/config #88

Closed ambv closed 11 months ago

ambv commented 11 months ago

Currently, miss-islington use of cherry-picker is aborting the cherry pick in case of conflicts. This doesn't work because self.initial_state is not being updated after conflicts are discovered by cherry-picker, and so the abort is raising a ValueError from the guard at the start of abort_cherry_pick().

Since self.initial_state is only used for those guards, let's just remove it and read from .git/config every time.