| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Also updated the examples to both use the async methods and remove the double reading of the index. repo.openIndex forces a read of the index so it doesn't make sense to do another one right after the first one happens. I think that was a holdover from an ancient version of libgit2. |
Sorry, something went wrong.
|
💖 |
Sorry, something went wrong.
|
We need to start using async/await internally. ^_^ |
Sorry, something went wrong.
| "isErrorCode": true | ||
| } | ||
| }, | ||
| "git_index_conflict_remove": { |
There was a problem hiding this comment.
If you want to be pedantic about keeping things sorted alphabetically, this one belongs a few entries down
Sorry, something went wrong.
Anytime the index reads/writes to the disk it should be non-blocking. Additionally this will give us thread safety protection since async methods are piped through the `LockManager`
So this test was never valid ¯\_(ツ)_/¯ You can't call `Index#addByPath` with an absolute path which was what was happening. Since the method was sync the result was considered the actual result of the call and not the error code so this error was never caught. Now that the function is async, that result is correctly interpretted and the test failed correctly. Changing this test to use the relative path fixes the test.
Writing an index to disk is now async and no longer returns it's result code. Instead of checking for `0` we can just handle the error callback/rejected promise case.
| Back | FazBrowse Home | New Git URL |
Anytime the index reads/writes to the disk it should be non-blocking. Additionally this will give us thread safety protection since async methods are piped through the LockManager