"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseBadConfigValueErrorInfo = void 0;
const errors_1 = require("./errors");
function parseBadConfigValueErrorInfo(stderr) {
    const errorEntry = Object.entries(errors_1.GitErrorRegexes).find(([_, v]) => v === errors_1.GitError.BadConfigValue);
    if (errorEntry === undefined) {
        return null;
    }
    const m = stderr.match(errorEntry[0]);
    if (m === null) {
        return null;
    }
    if (!m[1] || !m[2]) {
        return null;
    }
    return { key: m[2], value: m[1] };
}
exports.parseBadConfigValueErrorInfo = parseBadConfigValueErrorInfo;
//# sourceMappingURL=parse-bad-config-value-error-info.js.map