def last_commits(commit_sha, files_matcher)
      read_if_needed
      acceptable = commits_from(commit_sha)

      matches = {}

      if files_matcher.is_a? Regexp
        files = @all_files.keys.select { |file| file =~ files_matcher }
        files_matcher = files
      end

      if files_matcher.is_a? Array
        # find the last commit for each file in the array
        files_matcher.each do |f|
          @all_files[f].each do |try|
            if acceptable.include?(try)
              matches[f] = try
              break
            end
          end if @all_files[f]
        end
      end

      matches
    end
def last_commits(commit_sha, files_matcher)
      read_if_needed
      acceptable = commits_from(commit_sha)

      matches = {}

      if files_matcher.is_a? Regexp
        files = @all_files.keys.select { |file| file =~ files_matcher }
        files_matcher = files
      end

      if files_matcher.is_a? Array
        # find the last commit for each file in the array
        files_matcher.each do |f|
          @all_files[f].each do |try|
            if acceptable.include?(try)
              matches[f] = try
              break
            end
          end if @all_files[f]
        end
      end

      matches
    end
returns the shas of the last commits for all
 the files in [] from commit_sha
 files_matcher can be a regexp or an array