package com.atlassian.bitbucket.internal.branch.info;

import com.atlassian.bitbucket.repository.MinimalRef;
import com.atlassian.bitbucket.util.Page;

/**
 * Internal service for requesting branch information.
 * <p>
 * This may have different implementations, such as forking Git or keeping an on-disk cache of commits.
 * Implementations can be unaware of repository settings, such as default branches, which are handled elsewhere.
 *
 * @since 2.8
 */
public interface BranchInformation {

    /**
     * Returns the branches associated with a given commit, filtering by an optionally supplied list of branch globs.
     *
     * @param request request data for getting branches
     * @return the filtered page of associated branches
     */
    Page<MinimalRef> getBranches(BranchInfoRequest request);
}
