3 ms·
I'm fine with having a program that transforms the configuration file into a more diffable format, and then doing my diffs on the transformed files. I like for
by tzs 6y ago
I'm fine with having a program that transforms the configuration file into a more diffable format, and then doing my diffs on the transformed files.
I like for this a sorted name=value format, where non-scalars such as arrays and hashes are flattened into the names. E.g., if the config contains an array named "users" with 3 items, the name=value pairs would flatten to names users.0, users.1, and users.2. An array named "servers" whose entries are 3 hashes with the host name and port would flatten to names servers.0.host, servers.0.port, servers.1.host, servers.1.port, servers.2.host, servers.2.port.
That gives you diffs that tell you what has actually changed in the configuration itself rather than in the formatting of the configuration file.