[Python-Dev] I reverted "Add Windows App Store package" change

Nick Coghlan ncoghlan at gmail.com
Sat Dec 8 11:32:53 EST 2018


On Sat, 8 Dec 2018 at 09:10, Steve Dower <steve.dower at python.org> wrote:
> And let's be honest, there's no good tooling for turning a series of
> interdependent commits into a smaller set of sensible ones. Squashing at
> least gets rid of the changes that were reverted as part of the entire
> PR, and if you then just want to split by file you're really just asking
> for extra work.

Whether the UX counts as "good" or not is open to debate (I consider
it pretty good for the complexity of the task it handles), but if you
ever want to revise the history of a complex patch series to make it
easier for reviewers to follow:

1. Use "git rebase --interactive" to squash all the ad hoc commits
into a single commit
2. Use "git reset HEAD^" to unstage that squashed monolithic commit
3. Use "git add --patch" to compose a new commit series that takes a
reviewer through a logical set of changes, rather than the messy
reality of what actually happened

(I have no idea if there are any GUI tools which expose this level of
commit series editing power, but it exists on the command line, so
presumably there are graphical equivalents)

Most of the time this isn't worth the hassle, with either reviewing
the PR as a whole being good enough, or else there being subsets of
the changes which can be made into separate PRs that can be reviewed
and accepted independently.

However, on those occassions where you're needing to tell the
reviewers a story not only about what you changed, but also why you
changed it, then an hour or two spent up front creating a more
coherent commit history may save multiple hours of discussion later.

Cheers,
Nick.

P.S. Gerrit's entire review model is based around this idea of
dependent patch series, but code review UX turned out to be a
situation where optimising for the simple, common case (i.e. GitHub's
approach) proved to be a much better idea than focusing on the less
common complex cases.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list