package com.atlassian.bitbucket.mesh.git.builder.config;

/**
 * Enumerates the possible types that can be provided to {@code git config}, enabling it to ensure the configured
 * value conforms to expected formatting.
 */
public enum GitConfigType {

    ANY(null),
    BOOL("--bool"),
    INT("--int"),
    PATH("--path");

    private final String flag;

    GitConfigType(String flag) {
        this.flag = flag;
    }

    public String getFlag() {
        return flag;
    }

    public boolean isFlagged() {
        return flag != null;
    }
}
