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

import com.atlassian.bitbucket.mesh.git.builder.GitProcess;
import com.atlassian.bitbucket.mesh.git.builder.GitProcessBuilderSupport;

import javax.annotation.Nonnull;

/**
 * A builder to construct a git command for running {@code git add}.
 */
public interface GitAddBuilder extends GitProcessBuilderSupport<GitAddBuilder> {

    @Nonnull
    GitAddBuilder all(boolean value);

    @Nonnull
    GitProcess<Void> build();

    /**
     * Controls whether {@code --force} is passed to {@code git add}. When provided, {@code --force} overrides entries
     * from {@code .gitignore}, allowing ignored files to be added to the index and committed.
     *
     * @param value {@code true} to use {@code --force}, overriding {@code .gitignore}; otherwise, {@code false}
     *              to perform a "safe" {@code git add}
     * @return {@code this}
     */
    @Nonnull
    GitAddBuilder force(boolean value);

    @Nonnull
    GitAddBuilder path(String value);

    @Nonnull
    GitAddBuilder paths(Iterable<String> values);

    @Nonnull
    GitAddBuilder paths(String value, String... values);

    @Nonnull
    GitAddBuilder sparse(boolean value);
}
