Merge driver consists of three things:
1. .gitattributes definition that tells which files to process with which driver
2. Section in git/config that maps the logical merge driver name to a concrete script on a disk
3. The actual script files(s) - PHP or Bash impl in our case
It's a bit tricky because:
- .gitattributes is committed in the repo. The paths must therefore be relative.
- git/config is not committed in the repo so it must be created dynamically on actions
like activating VersionPress or restoring / cloning a site. Furthermore, the paths
must be absolute because Git's cwd can be different.
- We need cross-platform scripts so we detect the OS and install the correct driver.
The driver impl can be forced using the $driver parameter.