package com.atlassian.bitbucket.mesh.git.rebase;

import com.atlassian.bitbucket.mesh.git.ref.Branch;

import javax.annotation.Nonnull;

public interface RebaseManager {

    /**
     * @param parameters parameters describing the rebase to perform
     * @return the commit ID
     */
    @Nonnull
    String rebase(@Nonnull RebaseParameters parameters);

    /**
     * @param parameters parameters describing the rebase to dry-run
     */
    void tryRebase(@Nonnull RebaseParameters parameters);

    /**
     * @param parameters parameters describing the ref to update
     * @param commitId   the commit ID for updating the ref
     * @return the updated branch
     */
    @Nonnull
    Branch updateRef(@Nonnull RebaseParameters parameters, @Nonnull String commitId);
}
