[Pandas-dev] Thoughts on adopting a 1-PR-1-commit policy?

Jan Schulz jasc at gmx.net
Sun Jan 17 12:04:37 EST 2016


Hi,

On 17 January 2016 at 14:34, Wes McKinney <wesmckinn at gmail.com> wrote:
> I'm adding the mailing list back. Several comments inline

Oups, sorry!

> I'm not suggesting that you should have to squash your commits inside
> the PR. This only concerns how *patches are applied to pandas's master
> branch". Ideally, no squashing occurs inside the developer branch (so
> the "story", so to speak, about the patch is preserved), but what the
> Apache patch tool does is

I would still argue against this: the master branch is what is used in
blame and figuring out why something was done in that way is much
harder if you always have to get back to some commits in obscure
branches which might even be removed from the repo.

IMO, all this squashing is an incentive not to write good commit
messages as these are in the end more or less discarded as they are
all mixed up :-(

At least that what happened with me: I tried to write "unit of change"
commits (`rebase -i` all "typo" and "fixup" commits + good commits
messages) but then these got squashed and I stopped writing such
messages because it felt that this was simply wasted and not
appreciated.

The result was that some decisions which I took are not explained in
the commits and were lost when the topic were revisited half a year
latter.

> Here is something that would be very hard: create release notes given
> the commit history.

I don't think this gets any easier as long as some manual things are
done. There will still be simple commits which correct a typo and
which should not show up in the release notes. Whatever technical
solution is used for this, some discipline has to be taken to make
that successfull.

If release notes generation is what is this all about, then there
could be several solutions:

* only generate release notes from merge commits (remove headline,
only use message)
* only generate release notes from commits which include a tag
* only generate release notes from merge commits which include a tag

Jan


More information about the Pandas-dev mailing list