/// <summary> /// Update passed GitClient object. /// Throw GitOperationException on unrecoverable errors. /// Throw CancelledByUserException and RepeatOperationException. /// </summary> async internal Task UpdateAsync(GitClient client, IInstantProjectChecker instantChecker, Action <string> onProgressChange) { if (client.DoesRequireClone() && !isCloneAllowed(client.Path)) { InitializationStatusChange?.Invoke("Clone rejected"); throw new CancelledByUserException(); } InitializationStatusChange?.Invoke("Updating git repository..."); await runAsync(async() => await client.Updater.ManualUpdateAsync(instantChecker, onProgressChange)); InitializationStatusChange?.Invoke("Git repository updated"); }