Skip to content

localrepo: Adapt to changed error when parsing non-boolean config as boolean

Because we do not have any error code indicators for many errors of git-config(1), we have to resort to parsing its stderr to see whether it contains specific hints at what goes wrong. One of these checks is for when we request an explicit type for a given key, but the value doesn't conform to that type, which git indicates with an "invalid unit" message.

This message has been changed upstream in commit f276e2a469 (config: improve error message for boolean config, 2021-02-11), which changes the error message in case a boolean value was requested by the user. Let's adapt such that we properly handle both old and new error message.

Merge request reports

Loading