rugged icon indicating copy to clipboard operation
rugged copied to clipboard

Patch to_s timeout

Open mclark opened this issue 9 years ago • 3 comments

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:

  1. Calculating the diff_hunks in the original diff
  2. 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!

mclark avatar Sep 09 '16 20:09 mclark

Looks pretty good. Let's switch to a monotonic clock please. :)

vmg avatar Sep 10 '16 07:09 vmg

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. 👌

vmg avatar Sep 12 '16 16:09 vmg

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.

mclark avatar Sep 13 '16 12:09 mclark

This PR is 7 years old, time to close!

mclark avatar Feb 28 '23 13:02 mclark