diff --git a/GVFS/GVFS.Common/GitStatusCache.cs b/GVFS/GVFS.Common/GitStatusCache.cs index 717e7aebc..bce8f444f 100644 --- a/GVFS/GVFS.Common/GitStatusCache.cs +++ b/GVFS/GVFS.Common/GitStatusCache.cs @@ -372,9 +372,10 @@ private void UpdateHydrationSummary() } else { + metadata["Exception"] = hydrationSummary.Error?.ToString(); this.context.Tracer.RelatedWarning( metadata, - $"{nameof(GitStatusCache)}{nameof(RebuildStatusCacheIfNeeded)}: hydration summary could not be calculdated.", + $"{nameof(GitStatusCache)}{nameof(RebuildStatusCacheIfNeeded)}: hydration summary could not be calculated.", Keywords.Telemetry); } } diff --git a/GVFS/GVFS.Common/HealthCalculator/EnlistmentHydrationSummary.cs b/GVFS/GVFS.Common/HealthCalculator/EnlistmentHydrationSummary.cs index 02a32c2f5..6762e2665 100644 --- a/GVFS/GVFS.Common/HealthCalculator/EnlistmentHydrationSummary.cs +++ b/GVFS/GVFS.Common/HealthCalculator/EnlistmentHydrationSummary.cs @@ -12,6 +12,8 @@ public class EnlistmentHydrationSummary public int TotalFileCount { get; private set; } public int HydratedFolderCount { get; private set; } public int TotalFolderCount { get; private set; } + public Exception Error { get; private set; } = null; + public bool IsValid { @@ -67,7 +69,7 @@ public static EnlistmentHydrationSummary CreateSummary( TotalFolderCount = totalFolderCount, }; } - catch + catch (Exception e) { return new EnlistmentHydrationSummary() { @@ -75,6 +77,7 @@ public static EnlistmentHydrationSummary CreateSummary( HydratedFolderCount = -1, TotalFileCount = -1, TotalFolderCount = -1, + Error = e, }; } }