-
Notifications
You must be signed in to change notification settings - Fork 268
[Feat] Allow users to abort running commands #753
-
Allow users to cancel running commands to avoid waiting until the error message is displayed.
Example
I tried to push a commit and I didn't have connectivity with the remote, so I had to wait until Sourcegit return an error
image
image
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 2
Replies: 6 comments
-
It's not safe to cancel a running git command directly. You can use git config --global http.timeout <SECONDS>
to reduce the waiting time of network connection.
Beta Was this translation helpful? Give feedback.
All reactions
-
I think it is safe to send SIGTERM
to gracefully stop git as it installs a handler for this. The problem is there's no dotnet API for such thing dotnet/runtime#109432
Beta Was this translation helpful? Give feedback.
All reactions
-
GitExtension allow this behavior. And it is based on dotnet (I think) so maybe we can replicate their approach.
Beta Was this translation helpful? Give feedback.
All reactions
-
GitExtension allow this behavior. And it is based on dotnet (I think) so maybe we can replicate their approach.
Their approach is Windows-only
It is possible to use p/invoke and call whatever we need for the corresponding OS but that's cumbersome
Beta Was this translation helpful? Give feedback.
All reactions
-
I also intended to propose this feature. I've experienced significant delays cloning GitHub repositories in SourgeGit, with no option to cancel except by forcefully terminating the SourgeGit processes. Although the cloning issue can be problematic in itself, a dedicated cancel button would be a valuable addition.
Beta Was this translation helpful? Give feedback.
All reactions
-
I'm also in favor of this proposal.
I regularly run into this problem when triggering fetch/pull/push on a repository, which requires a VPN being connected. If I forgot that and establish the VPN connection shortly after triggering e.g. fetch, then I still have to wait for quite a while (like a connectivity timeout).
My workaround is to quit SourceGit and restart, which doesn't seem ideal.
Beta Was this translation helpful? Give feedback.