export const getCommitsOnPath = (branches, tillCommit) => {
  console.log(branches, tillCommit)
  return branches.find(b => b.id === tillCommit.branchId).commits.filter(c => c <= tillCommit.id)
}

export const isCommitOnActiveBranch = (activeBranch, commitId) =>
  activeBranch.commits.includes(commitId)

export const isCommitOnActivePath = (activeBranch, activeCommitId, commitId) =>
  isCommitOnActiveBranch(activeBranch, commitId) && commitId <= activeCommitId
