tarantool / checkpatch

Checkpatch for Tarantool
GNU General Public License v2.0
2 stars 2 forks source link

Check submodules' commits #9

Open alyapunov opened 2 years ago

alyapunov commented 2 years ago

There are two common mistakes that are comparably easy to make and have significant consequences.

  1. Submodule was updated by mistake.
  2. Submodule was updated to a wrong commit that is not in master branch of the submodule.

It would be great if checkpatch could find those mistakes.

  1. Let's introduce a special commit message tag, that shows that submodule update was intended. Something like "UPDATE_SUBMODULE=". Don't allow commits with submodule update without appropriate commit message tags.
  2. Let's check that submodule commit is in master tree. Perhaps it can be done as in tarantool/tools/check_push_master.sh, it should be investigated. And perhaps having done that, check_push_master.sh must be removed.
tsafin commented 2 years ago

In the past, to prevent such kind of problems with committing actual reverts of submodule history, in Yandex.Taxi we started to check that commit updating submodule is actually ancestor, and not predecessor in its' git history. (Without any special commit message and what not)