fix: Passthrough git fetch error messages as warnings

User feedback was that it's difficult to understand what to correct in
git configuration if the git error message is not shown to users.

Contributes to #355
pull/360/head
Robert Dailey 5 months ago
parent cbecf28b25
commit be9b9906e9

@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Notifications: New `verbosity` setting for Notifications to control the frequency and content of
notifications sent after sync operations.
### Fixed
- Repositories: Show a warning when there's a `git fetch` failure (#355).
## [7.3.0] - 2024-10-28
### Added

@ -62,11 +62,8 @@ public class RepoUpdater(ILogger log, IGitRepositoryFactory repositoryFactory) :
}
catch (GitCmdException e)
{
log.Debug(e, "Non-zero exit code {ExitCode} while running git fetch", e.ExitCode);
log.Error(
"Updating the repo '{RepoDir}' (git fetch) failed. Proceeding with existing files. " +
"Check clone URL is correct and that github is not down",
repoPath.Name);
log.Warning(e, "Non-zero exit code {ExitCode} while running git fetch (will proceed with existing files)",
e.ExitCode);
}
await repo.ResetHard(token, repoSettings.Sha1 ?? $"origin/{branch}");

Loading…
Cancel
Save