| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Thanks! I have a bunch of comments and questions — feel free to only address the ones that make sense.
Sorry, something went wrong.
| /** | ||
| * Deepen the git history of the given ref by one level. Errors are ignored. | ||
| */ | ||
| export const deepenGitHistory = async function () { |
There was a problem hiding this comment.
Two comments about the additions to this file in general:
Sorry, something went wrong.
There was a problem hiding this comment.
The error is indeed logged centrally within runGitCommand(). By "Errors are ignored", I was trying to convey that errors are not reported back to the caller. I have update the function documentation to clarify the behavior.
Moving the git interactions to its own file sounds like a good idea, though trying to incorporate that into this PR is a bit messy. Can I defer that to a dedicated PR after this one merges?
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, that's fine!
Sorry, something went wrong.
| const results = new Array<[string, number, number]>(); | ||
|
|
||
| let changedFile = ""; | ||
| for (const line of diffHunkHeaders) { |
There was a problem hiding this comment.
In general this seems to keep going when it sees certain kinds of unexpected items in the diff. It seems that there's a risk of missing changed files — should we be more robust here, or fail more eagerly, or is that not important for now?
Sorry, something went wrong.
There was a problem hiding this comment.
Can you tell me more about the risk you see, and how the code can be made more robust?
Sorry, something went wrong.
There was a problem hiding this comment.
Here are some examples where we seem to find unexpected items in the diff:
In these cases we seem to be encountering something unexpected, but we log or ignore the error and carry on. My question is could these cases where the diff isn't quite as we expect cause us to miss some files that have been changed by the PR, and therefore cause us to miss alerts? If so, we'd probably want to return undefined and fall back to a full analysis.
Sorry, something went wrong.
There was a problem hiding this comment.
That is a great observation. Thank you! I have updated the PR accordingly.
Sorry, something went wrong.
Thanks for the detailed comments and helpful suggestions! PTAL. |
Sorry, something went wrong.
There was a problem hiding this comment.
There's one remaining thread here, but otherwise LGTM!
Sorry, something went wrong.
I updated the PR, which implements your suggestion and also fixes a minor bug in the handling of deletion hunks (where git reports the insertion line range as 0). See diff for the latest force-push for details. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks @cklin!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Merge / deployment checklist