Interface BlameCache


public interface BlameCache
Keeps the blame information for a path at certain commit.

If there is a result, it covers the whole file at that revision

Since:
7.2
  • Method Summary

    Modifier and Type
    Method
    Description
    get(Repository repo, ObjectId commitId, String path)
    Gets the blame of a path at a given commit if available.
  • Method Details

    • get

      List<CacheRegion> get(Repository repo, ObjectId commitId, String path) throws IOException
      Gets the blame of a path at a given commit if available.

      Since this cache is used in blame calculation, this get() method should only retrieve the cache value, and not re-trigger blame calculation. In other words, this acts as "getIfPresent", and not "computeIfAbsent".

      Parameters:
      repo - repository containing the commit
      commitId - we are looking at the file in this revision
      path - path a file in the repo
      Returns:
      the blame of a path at a given commit or null if not in cache
      Throws:
      IOException - error retrieving/parsing values from storage