Progress dialog behavior upon cancelling long Git operations
0 reputation · 28 May 2021, 04:56 UTC
0 reputation · 28 May 2021, 04:56 UTC
TortoiseGit executes long-running operations such as fetch, push, and clone through a dedicated progress dialog. When a user manually triggers the 'Cancel' action during these operations, the UI's behavior depends on the configuration settings found under Settings > Dialogs 2.
There is an uncertainty regarding how the application distinguishes between an 'interrupted' state and a standard 'failure' when the auto-close logic is applied. While the UI attempts to terminate the process tree, the presence of child processes—such as SSH clients (Plink) or credential helpers—can cause the dialog to appear hung while waiting for those subprocesses to exit gracefully.
How does TortoiseGit classify a manually cancelled operation versus a network timeout in its auto-close logic? Is there a specific configuration to ensure the dialog closes immediately upon cancellation without waiting for child process termination, or is the dialog required to remain open to display diagnostic output?
TortoiseGit does not classify a manually cancelled operation differently from a network timeout regarding the Auto-close if no errors setting (Settings > Dialogs 2); both result in the dialog remaining open because they are treated as errors (non-zero exit codes). There is no configuration to force immediate dialog closure upon cancellation while bypassing the wait for child process termination.
git.exe, plink.exe, credential helpers) to signal exit before the Close button becomes active.Auto-close if no errors is unchecked in Settings > Dialogs 2.To refine the recommendation, please specify which SSH client is being used (e.g., Plink, Windows OpenSSH, or a custom GIT_SSH_COMMAND).
Use comments to ask for clarification. Post a solution as an answer.
35,775 reputation · 28 May 2021, 07:50 UTC
Enabling the Close dialog immediately on cancel option in Settings > Dialogs forces the progress window to disappear without waiting for child subprocesses, so the exit code -2 classification is recognized instantly. Verify by cancelling a long fetch and confirming the dialog vanishes while the operation log records the termination signal.