Skip to content

Fix build break: return DownloadAttemptResult from the malformed-SHA guard - #2091

Merged
tyrielv merged 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/fix-hydration-attempt-result
Aug 14, 2026
Merged

Fix build break: return DownloadAttemptResult from the malformed-SHA guard#2091
tyrielv merged 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/fix-hydration-attempt-result

Conversation

@tyrielv

@tyrielv tyrielv commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Fixes a build break on master caused by a merge-order semantic conflict
between two changes that were each green on their own branch:

  • One change added a malformed-SHA guard that early-returned
    DownloadAndSaveObjectResult.Error.
  • The other changed TryDownloadAndSaveObject to return DownloadAttemptResult
    (the result enum plus an HTTP status code).

Merged together, the guard returned the bare enum where a DownloadAttemptResult
was expected, so the build failed with:

GVFSGitObjects.cs(267,24): error CS0029: Cannot implicitly convert type
'DownloadAndSaveObjectResult' to 'GVFSGitObjects.DownloadAttemptResult'

Fix: wrap the error in a DownloadAttemptResult with a null status code,
matching the AllZeroSha guard immediately below it.

Verification: GVFS.Common builds clean; full unit suite passes (917 passed,
0 failed, 11 skipped).

The malformed-SHA guard in TryDownloadAndSaveObject returned the bare
DownloadAndSaveObjectResult enum. The method now returns DownloadAttemptResult
(the enum plus an HTTP status code), so the build failed with CS0029. Wrap the
error in a DownloadAttemptResult with a null status code, matching the
AllZeroSha guard just below it.

Assisted-by: Claude Opus 4.8
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
@tyrielv
tyrielv enabled auto-merge August 14, 2026 22:10
@tyrielv
tyrielv merged commit 976abfb into microsoft:master Aug 14, 2026
35 checks passed
@tyrielv tyrielv mentioned this pull request Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants