fix post-merge and post-commit hooks to work with every merge strategy