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

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

import javax.annotation.Nonnull;

public class DefaultGitBlame implements GitBlame {

    private final GitProcessBuilder builder;

    public DefaultGitBlame(GitProcessBuilder builder) {
        this.builder = builder.command("blame");
    }

    @Nonnull
    @Override
    public DefaultGitBlameBuilder incremental() {
        return new DefaultGitBlameBuilder(builder, BlameFormat.INCREMENTAL);
    }

    @Nonnull
    @Override
    public DefaultGitBlameBuilder porcelain() {
        return new DefaultGitBlameBuilder(builder, BlameFormat.PORCELAIN);
    }
}
