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

import com.atlassian.bitbucket.mesh.git.builder.GitProcessBuilder;

import javax.annotation.Nonnull;

import static java.util.Objects.requireNonNull;

public class DefaultGitCheckRefFormat implements GitCheckRefFormat {

    private final GitProcessBuilder builder;

    public DefaultGitCheckRefFormat(@Nonnull GitProcessBuilder builder) {
        this.builder = requireNonNull(builder, "builder").command("check-ref-format");
    }

    @Nonnull
    @Override
    public GitCheckRefFormatBuilder ref(@Nonnull String refName) {
        return new DefaultGitCheckRefFormatBuilder(refName, builder);
    }
}
