git-diff
git-diff copied to clipboard
Async function not really async
As long as the sync function is really sync, i.e. no other node.js code can run while it's waiting for the data, then there's no way to make it async. The current implementation does provide callback compatibility, but naming it "async" looks like a big lie.
Thanks to @joepie91 for pointing out this bug on IRC.
Anyone wanna raise a PR for this? I am busy ATM - If anyone has time, unit tests must continue to pass with 100% coverage (unless a valid reason is given why coverage is not 100% and the relevant block should be commented out with istanbul ignore - happy to add contributors as npm contributors also so they can publish)