Skip to content

Extract more info from a git hunk header

Latest
Compare
Choose a tag to compare
@Edouard-chin Edouard-chin released this 02 Sep 13:08
· 1 commit to main since this release

Added

  • Added GithubDiffParser::Hunk#context which returns the context of the hunk.
    In this example, it would return "def blabla"

    @@ +1,6 -1,18 def blabla
  • Added GithubDiffParser::Hunk#previous_line_count which returns the prevous line count in a hunk.
    In this example, it would return 6.

    @@ +1,6 -1,18 def blabla
  • Added GithubDiffParser::Hunk#new_line_count which returns the prevous line count in a hunk.
    In this example, it would return 18.

    @@ +1,6 -1,18 def blabla

Fixed

  • GithubDiffParser::Diff#previous_line_number_is_now could return a wrong value
    for the line number 1 in a file.