Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Allow users to abort running commands #699

Open
albertodlc opened this issue Nov 14, 2024 · 5 comments
Open

[Feat] Allow users to abort running commands #699

albertodlc opened this issue Nov 14, 2024 · 5 comments
Assignees
Labels
suggestion We are still considering whether it is necessary to add this feature

Comments

@albertodlc
Copy link
Contributor

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

@love-linger
Copy link
Collaborator

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.

@love-linger love-linger self-assigned this Nov 14, 2024
@love-linger love-linger added the suggestion We are still considering whether it is necessary to add this feature label Nov 14, 2024
@aikawayataro
Copy link
Contributor

aikawayataro commented Nov 14, 2024

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

@albertodlc
Copy link
Contributor Author

GitExtension allow this behavior. And it is based on dotnet (I think) so maybe we can replicate their approach.

@aikawayataro
Copy link
Contributor

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

@dougcunha
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion We are still considering whether it is necessary to add this feature
Projects
None yet
Development

No branches or pull requests

4 participants