Repository navigation
Keep fetch --porcelain when submodule recursion is explicitly No [patch] - #206
Merged
Merged
Conversation
git refuses --porcelain only alongside a --recurse-submodules mode that recurses (yes, on-demand). An explicit RecursingSubmodules(No), as used to override a host's submodule.recurse=true, now keeps the itemised Updates instead of reporting DetailAvailable false. CLAUDE.md no longer says git refuses the pair outright. Fixes #142 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015EHSar1iXDsM19Xk1rHpKp
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #142
Before:
Fetch().RecursingSubmodules(GitSubmoduleRecursion.No)dropped--porcelain, so the result hadDetailAvailable == falseand an emptyUpdateslist. This affected callers who passNoto override a host'ssubmodule.recurse=true.After:
--porcelainis dropped only forYesandOnDemand. git rejects the pair only for a recursion mode that actually recurses.--recurse-submodules=nowith--porcelainexits 0 and prints the porcelain records (checked against git 2.43).Changes:
GitFetchBuilder.IsPorcelainAvailablenow accepts_submoduleRecursion is null or GitSubmoduleRecursion.No, and its remarks are updated.--porcelainwith--recurse-submodules"outright".FetchKeepsPorcelainWhenRecursionIsExplicitlyNo.FetchWithRecursionExplicitlyOffStillReportsTheUpdatesAsync. It runs against real git and checks thatUpdatesis populated, and thatDetailAvailabledepends only on the version threshold.Testing:
GitFetchBuilderchange is reverted, and pass with it.🤖 Generated with Claude Code
https://claude.ai/code/session_015EHSar1iXDsM19Xk1rHpKp
Generated by Claude Code