Patch to_s timeout
When calculating very large patches, there is the potential for the call to hang for a while without any feedback to the caller.
Potentially this could manifest itself in one of two places:
- Calculating the diff_hunks in the original diff
- Translating the lines of those hunks into ruby strings
This patch addresses the latter and gives us a mechanism to bail early when the diff output is taking too long.
I'm not sure if there is a clear path to addressing a timeout in the former case, but I am open to suggestions and feedback on both ideas.
Thanks so much to @brianmario for 🍐 ing with me on this one!
Looks pretty good. Let's switch to a monotonic clock please. :)
Looking good @mclark. As you can see, we can drop a lot of libgit2's original code because we support fewer platforms. That's good news!
Please do that and ping me back so I can audit the remaining code against libgit2's original blame -- as it is an OSS project, we cannot magically relicense it from GPLv2 to MIT without asking the contributors. Unless the contributors are @carlosmn and @ethomson. In that case we can, because we pay them money to abuse their copyright. 👌
thanks @brianmario for catching that one! C is weird! 😛
@vmg All concerns save the legal ones have been addressed. I can rebase this to clean it up if you like before we proceed.
This PR is 7 years old, time to close!