git filter branch が警告を出すようになった2021年04月03日 12時38分40秒

FreeBSD 12.2-RELEASE を FreeBSD 13.0-RC に上げたのを期に、ports/pkg も更新した。その中で気が付いた一つ。

git filter branch が警告を出し、一時停止するようになった。

% git filter branch ...
WARNING: git-filter-branch has a glut of gotchas generating mangled history
         rewrites.  Hit Ctrl-C before proceeding to abort, then use an
         alternative filtering tool such as 'git filter-repo'
         (https://github.com/newren/git-filter-repo/) instead.  See the
         filter-branch manual page for more details; to squelch this warning,
         set FILTER_BRANCH_SQUELCH_WARNING=1.

何もしないで待ち続けるとそのまま filter branch が行われる。

git filter branch は過去の履歴をほぼ書き換えてしまうので、履歴管理には確かに害の方が多い。

共有前や、git に移行の最終調整に git filter branch は良く使った。一つの Subversion のレポジトリを git に移行時に数百に切り分けた。履歴を綺麗に保つためや、共有だったファイルの微調整など色々とやることがあった為。