git_diff_parser
git_diff_parser
A git diff parser but in Crystal - Ported from https://github.com/packsaddle/ruby-git_diff_parser
Installation
-
Add the dependency to your
shard.yml
:dependencies: git_diff_parser: github: microgit-com/git_diff_parser
-
Run
shards install
Usage
require "git_diff_parser"
Entirely Git Diff
Then use the patches parse:
patches = GitDiffParser::Patches.parse(diff)
I added paddlesaddle's GitDiffParser.parse
method, even if it was deprecated. So you can use it as well if you want.
A small diff (commit diff, file diff)
Then use the patch new:
patch = GitDiffParser::Patch.new(diff)
Development
I copy more or less everything from paddlesaddle and ported it to crystal. Even the specs. So Run crystal spec
if you add or change anything to make sure it works :)
Contributing
- Fork it (https://github.com/microgit-com/git_diff_parser/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Håkan Nylén - creator and maintainer
Repository
git_diff_parser
Owner
Statistic
- 2
- 0
- 0
- 1
- 0
- over 4 years ago
- March 5, 2020
License
MIT License
Links
Synced at
Wed, 06 Nov 2024 20:35:43 GMT
Languages