ivantsepp / jekyll-git_metadata

Expose Git metadata to Jekyll.
MIT License
67 stars 25 forks source link

Request: Use decent ruby-git library #6

Open matthiasbeyer opened 9 years ago

matthiasbeyer commented 9 years ago

Instead of parsing commandline output, we should really use a git library here like grit or rugged...

matthiasbeyer commented 9 years ago

What? No we cannot, as we cannot assume that the repository is on github!

ivantsepp commented 7 years ago

I agree that a library wrapper around Git is ideal. I currently do not have the time to work on this so I'm happy to take contributions

jamietanna commented 6 years ago

I've been making some progress on this so far by integrating ruby-git in without breaking existing tests. I'll send over a PR once I've been able to get it to a state where feedback would be helpful, if that sounds good?

jamietanna commented 6 years ago

I've got almost all of the code changes sorted for this PR - I'm mostly cleaning up history now. There are a couple of discussion points at a couple of places where it may be easier just to parse output, but happy to discuss.

https://github.com/ruby-git/ruby-git/pull/177#issuecomment-379695788 will need an answer - as currently I have failing tests when changing how dates are handled.

As it stands, this will be a breaking change due to how merge commits are dealt with - without these changes, merge commits are ignored, and instead the 0th parent is shown. But with this PR in, it'll impact that, and potentially break any assumptions people are making about those commits - I'd be happy to discuss what options we have or if you'd be happy with a major bump being introduced.

Edit: Given we're still on a 0.x release, I feel it would be okay, under SemVer to introduce a breaking change at this time.