Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

pre-commit changes

by
PHI Srl, Marco Colombo
- 02/12/2022 13:43:55
Hi,
quick question about pre-commit changes during migration.

I'm migrating a module from 14.0 to 16.0. I've noticed that the first pre-commit related commit ("[IMP]: pre-commit stuff") takes care only of part of the changes needed to make pre-commit happy (it is possible due to the --no-verify). The missing part can be significant.
The following commit ("[MIG]: $MODULE: Migration to 16.0") must include those changes too, plus anything migration related.

So I was wondering if that defeats the purpose of having pre-commit changes separated in their own commit.  Right now, my approach is to create a second commit, named "[IMP]: more pre-commit stuff", just to make pre-commit happy, and then add another commit with the migration stuff.

Alternatives I've considered: ignoring the issue and include both migration and the rest of pre-commit changes in one commit ("[MIG]: $MODULE: Migration to 16.0"), or do as I do now but squash the two pre-commit related commits before merge (or equivalently, get rid of the --no-verify in the first place, and manually add all changes to the first commit).

Thoughts / suggestions?

Follow-Ups