Skip to content

Add few convenient methods

Choose a tag to compare

@Edouard-chin Edouard-chin released this 21 Feb 10:36
· 14 commits to main since this release

[1.1.0] - 2024-2-21

Added

  • Github Diff Parser parses the permissions bits and you now have have access to various method
    such as:
    • GithubDiffParser::Diff#normal_file? when the bits are 100644
    • GithubDiffParser::Diff#executable? when the bits are 107555
    • GithubDiffParser::Diff#symlink? when the bits are 120000
  • Introduce GithubDiffParser::Diff#symlink_source. When the diff applies to a symbolic link, symlink_source will
    return the path to where the symbolic link points to.
  • Introduce GithubDiffParser::Diff#apply, a simple implementation of git apply.
  • Introduce GithubDiffParser::Diff#revert, a simple implementation of git apply -R.

Fixed

  • GithubDiffParser::Line#content didn't include \n (if the line had one).