Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract more info from the hunk header: #13

Merged
merged 1 commit into from
Aug 18, 2024
Merged

Conversation

Edouard-chin
Copy link
Member

@Edouard-chin Edouard-chin commented Aug 18, 2024

  • Added the Hunk#context, Hunk#previous_line_count and Hunk#new_line_count methods.

    In this example header @@ +1,6 -1,18 def blabla, the methods would respectively return:

    1. "def blabla"
    2. 6
    3. 18

    The *line_count methods are computed rather than extracted because those number are optional in a git diff output depending on how many lines were changed.

- Added the `Hunk#context`, `Hunk#previous_line_count` and `Hunk#new_line_count` methods.

  In this example header `@@ +1,6 -1,18 def blabla`, the methods
  would respectively return:

  1) "def blabla"
  2) 6
  3) 18

  The `*line_count` methods are computed rather than extracted
  because those number are optional in a git diff output depending on
  how many lines were changed.
@Edouard-chin Edouard-chin merged commit 85ce9c8 into main Aug 18, 2024
4 checks passed
@Edouard-chin Edouard-chin deleted the ec-hunk-more-info branch August 18, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant