Class BlameCommand

    • Constructor Detail

      • BlameCommand

        public BlameCommand​(Repository repo)
        Constructor for BlameCommand
        Parameters:
        repo - the Repository
    • Method Detail

      • setFilePath

        public BlameCommand setFilePath​(String filePath)
        Set file path.
        Parameters:
        filePath - file path (with / as separator)
        Returns:
        this command
      • setStartCommit

        public BlameCommand setStartCommit​(AnyObjectId commit)
        Set start commit id
        Parameters:
        commit - id of a commit
        Returns:
        this command
      • setFollowFileRenames

        public BlameCommand setFollowFileRenames​(boolean follow)
        Enable (or disable) following file renames.

        If true renames are followed using the standard FollowFilter behavior used by RevWalk (which matches git log --follow in the C implementation). This is not the same as copy/move detection as implemented by the C implementation's of git blame -M -C.

        Parameters:
        follow - enable following.
        Returns:
        this
      • reverse

        public BlameCommand reverse​(AnyObjectId start,
                                    AnyObjectId end)
                             throws IOException
        Configure the command to compute reverse blame (history of deletes).
        Parameters:
        start - oldest commit to traverse from. The result file will be loaded from this commit's tree.
        end - most recent commit to stop traversal at. Usually an active branch tip, tag, or HEAD.
        Returns:
        this
        Throws:
        IOException - the repository cannot be read.
      • reverse

        public BlameCommand reverse​(AnyObjectId start,
                                    Collection<ObjectId> end)
                             throws IOException
        Configure the generator to compute reverse blame (history of deletes).
        Parameters:
        start - oldest commit to traverse from. The result file will be loaded from this commit's tree.
        end - most recent commits to stop traversal at. Usually an active branch tip, tag, or HEAD.
        Returns:
        this
        Throws:
        IOException - the repository cannot be read.