You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you hit 'hhh' to hunk 3 hunks in a row fast, you likely get a 'cannot apply patch' error from git.
Basically, view and state are out of sync here. Typically 'hunking' must be blocking on the main thread. Or: 'hunking' must update the view optimistically. Since the latter is almost impossible to do right, we should use the 'blocking' strategy.
The text was updated successfully, but these errors were encountered:
kaste
added a commit
to kaste/GitSavvy
that referenced
this issue
Feb 14, 2019
We must ensure that hitting 'h' very fast does run completely ordered, and
always waits for 'gs_diff_refresh' to complete. ('gs_diff_refresh' updates our
model.)
Please NOTE that running a command from the worker will still run that command
on the main thread. T.i. `set_timeout_async(lambda: view.run_command("refresh"))`
is misleading and a footgun because the "refresh" command here will still start
on the main thread. We basically just await the worker and then put a
task/command on the main worker queue.
Fixestimbrel#1104
We must ensure that hitting 'h' very fast does run completely ordered, and
always waits for 'gs_diff_refresh' to complete. ('gs_diff_refresh' updates our
model.)
Please NOTE that running a command from the worker will still run that command
on the main thread. T.i. `set_timeout_async(lambda: view.run_command("refresh"))`
is misleading and a footgun because the "refresh" command here will still start
on the main thread. We basically just await the worker and then put a
task/command on the main worker queue.
Fixes#1104
If you hit 'hhh' to hunk 3 hunks in a row fast, you likely get a 'cannot apply patch' error from git.
Basically, view and state are out of sync here. Typically 'hunking' must be blocking on the main thread. Or: 'hunking' must update the view optimistically. Since the latter is almost impossible to do right, we should use the 'blocking' strategy.
The text was updated successfully, but these errors were encountered: