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

import javax.annotation.Nonnull;
import java.nio.file.Path;

public interface RefFetchStrategy {

    /**
     * @param parameters describes the ref to fetch
     * @param workTree   the work tree
     * @return the merge hash
     */
    String fetch(@Nonnull RefFetchParameters parameters, @Nonnull Path workTree);

    /**
     * @param parameters describes the ref to fetch
     * @param mergeHash  the merge hash
     */
    void updateRef(@Nonnull RefFetchParameters parameters, @Nonnull String mergeHash);
}
