-
Notifications
You must be signed in to change notification settings - Fork 239
Merge driver doesn't work on Debian-based systems #1384
Description
We currently maintain two implementations of a Git merge driver, ini-merge.sh and ini-merge.php. The .sh one is used on Linux and macOS systems and we tried to make it compatible with various Bash and sh implementations, see e.g. a6e05c0. However, it seems that we found one that doesn't work, through a failed CloneMergeTest#dateModifiedMergesAutomatically test.
(Note: for a while, we thought that the problem is in the test, see PR #1376 and an issue #1382 but it's really a Bash / sh incompatibility.)
This test runs on our WordPress Docker image which is based on wordpress:php7.2-apache which is based on debian:stretch-slim. For comparison, the merge driver is also tested by MergeDriverTest, specifically by mergedDatesWithoutConflict and all is fine there. The only substantial difference is that these tests run on the versionpress/wordpress:cli image which is based on wordpress:cli which is based on Alpine Linux.
I'm not quite sure if the "stretch-slim" image is heavily customized or if the bug affects all Debian-based distributions but it's quite bad anyway as it would affect all users of the official WordPress Docker image.
The best way to fix this would be to re-implement the merge drive in Go as suggested in #736 and drop both the Shell and PHP implementations. It's a relatively ugly and fragile code and we don't want to maintain it twice.
I'll keep this issue open until the Go implementation is ready.