def commits_from(commit_sha)
      raise UnsupportedRef if commit_sha.is_a? Array
      read_if_needed

      already = {}
      final = []
      left_to_do = [commit_sha]

      while commit_sha = left_to_do.shift
        next if already[commit_sha]

        final << commit_sha
        already[commit_sha] = true

        commit = @commit_index[commit_sha]
        commit[:parents].each do |sha|
          left_to_do << sha
        end if commit
      end

      sort_commits(final)
    end
def commits_from(commit_sha)
      raise UnsupportedRef if commit_sha.is_a? Array
      read_if_needed

      already = {}
      final = []
      left_to_do = [commit_sha]

      while commit_sha = left_to_do.shift
        next if already[commit_sha]

        final << commit_sha
        already[commit_sha] = true

        commit = @commit_index[commit_sha]
        commit[:parents].each do |sha|
          left_to_do << sha
        end if commit
      end

      sort_commits(final)
    end
builds a list of all commits reachable from a single commit