Fix commit data; author, missing file changes. #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Review this after #29 lands. It's directly built on top of that.
See issue #28 ; the commit "added, removed" etc data wasn't coming through, and author name and email parsing was generally horked. Both were regex issues which I either replaced or rewrote.
For the name and email parsing, this is obvious; check the commit in this PR.
Note there is a subtle fix in here- for the first file mutation data,
diff-treewill not properly reference the parent since there is no parent. IE, it gives back no changed files even if obviously the first commit adds files. The solution is to force it to diff against the hardcoded SHA for repository initialization.Don't ask me how I know of this gotcha, but it's bit me in the ass before, thus I noticed it.
Other points of note:
-Mwas added so renames are actually detected.gitfunction was allowing non-zero exit code from git- bad calls. This is why the ref deletion event was exploding further down the stack for example. I changed this to explode if a git call fails.diff-treeresults that should be impossible for this code usage.