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

import com.atlassian.bitbucket.mesh.git.builder.diff.GitDiffBuilder;
import com.atlassian.bitbucket.mesh.git.builder.diff.GitDiffOutput;
import com.atlassian.bitbucket.mesh.git.builder.revlist.GitRevCoreBuilder;
import com.atlassian.bitbucket.mesh.git.builder.revlist.GitRevListBuilder;

import javax.annotation.Nonnull;

/**
 * Currently a minimal API for getting logs beyond renaming. May be expanded in the future to offer the union of
 * options of {@link GitRevListBuilder} and {@link GitDiffBuilder}.
 */
public interface GitLogBuilder extends GitRevCoreBuilder<GitLogBuilder> {

    /**
     * Controls use of {@code --follow}
     *
     * @param value {@code true} to continue listing the history of a file beyond renames (works only for a single file).
     * @return {@code this}
     */
    @Nonnull
    GitLogBuilder follow(boolean value);

    /**
     * Controls what diff output is included with the commit information.
     * <p>
     * Note that, while all of these flags are <i>supported</i>, they may not have an <i>effect</i>.
     * {@link GitDiffOutput#CHECK --check}, for example, does not affect the output of {@code git log}.
     *
     * @param value the diff output mode for the {@code log} command
     * @return {@code this}
     */
    @Nonnull
    GitLogBuilder output(@Nonnull GitDiffOutput value);
}