SourceTree Git Retry Handling and Write Duplication Prevention
0 reputation · 30 Jun 2022, 16:55 UTC
Git Operations Retry Handling in SourceTree
SourceTree relies on Git's native retry mechanisms for network operations rather than implementing its own retry logic. When performing fetch, pull, or push operations, the client delegates retry handling to Git's built-in credential caching and retry capabilities. The behavior is controlled through git config parameters like http.version and http.maxRequests, which determine how Git handles network interruptions.
However, a critical question remains about write duplication during retry scenarios. Git's built-in retry behavior has known limitations regarding duplicate writes when network failures occur mid-operation. Since SourceTree's GUI operations may exhibit different behavior than CLI Git during retry scenarios, there's uncertainty about whether the application layer can effectively prevent duplicate writes.
The key concern is whether SourceTree can detect and handle partial writes that might occur during network interruptions, and whether it has any documented mechanism to prevent data duplication when retries are triggered. This becomes particularly important for operations that modify repository state.
Which specific Git configuration settings does SourceTree expose or recommend for preventing write duplication during network retries, and how does the application distinguish between safe retry scenarios and operations that should be aborted to prevent duplicate writes?