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

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

import javax.annotation.Nonnull;

/**
 * @since 2.1
 */
public interface RevertManager {

    /**
     * @param parameters parameters describing the revert operation to perform
     * @return the revert commit hash
     */
    @Nonnull
    String revert(@Nonnull RevertParameters parameters);

    /**
     * @param parameters parameters describing the ref to update
     * @param revertHash the revert commit hash for updating the ref
     * @return the updated branch
     */
    @Nonnull
    Branch updateRef(@Nonnull RevertParameters parameters, @Nonnull String revertHash);
}