fix: correct fetchRecurseSubmodules key lookup in from_gitmodules#34
Merged
bashandbone merged 2 commits intofeat/test-expansionfrom Mar 19, 2026
Merged
fix: correct fetchRecurseSubmodules key lookup in from_gitmodules#34bashandbone merged 2 commits intofeat/test-expansionfrom
bashandbone merged 2 commits intofeat/test-expansionfrom
Conversation
…etchRecurse fallback Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix serialization/deserialization bug and expand testing
fix: correct fetchRecurseSubmodules key lookup in from_gitmodules
Mar 19, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes parsing of the git submodule fetchRecurseSubmodules setting when reading .gitmodules by updating SubmoduleEntry::from_gitmodules to use the correct key (with a fallback for legacy input).
Changes:
- Read
fetchRecurseSubmodulesfirst when parsing gitmodules entries. - Fall back to
fetchRecursefor backward compatibility.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+529
to
531
| .get("fetchRecurseSubmodules") | ||
| .or_else(|| entries.get("fetchRecurse")) | ||
| .and_then(|fr| SerializableFetchRecurse::from_gitmodules(fr).ok()); |
bashandbone
approved these changes
Mar 19, 2026
bashandbone
added a commit
that referenced
this pull request
Mar 19, 2026
…in core areas. (#33) * feat: Add schema; delete old CLAUDE.md for regeneration. * fix: Fixed an issue with toml deserialization due to mismatched expectations between serialize and deserialize forms. Caught by some of the new expanded tests. * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: correct fetchRecurseSubmodules key lookup in from_gitmodules (#34) * Initial plan * fix: use correct fetchRecurseSubmodules key in from_gitmodules with fetchRecurse fallback Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix: SPDX headers in CLAUDE.md; delegate SerializableBranch deserialization to from_gitmodules (#36) * Initial plan * fix: add SPDX headers to CLAUDE.md; delegate SerializableBranch deserialization to from_gitmodules Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Relocate branch deserialization test to correct module Moved the test for branch deserialization from TOML to the appropriate test module. * fix: correct TOML deserialization test for SerializableBranch empty/whitespace rejection (#37) * Initial plan * fix: use wrapper struct for branch TOML deserialization test to properly isolate SerializableBranch Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
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.
SubmoduleEntry::from_gitmoduleswas looking up"fetchRecurse"instead of"fetchRecurseSubmodules", the actual key used by git in.gitmodules. This causedfetch_recurseto always parse asNonewhen reading gitmodules data.Changes
src/config.rs: Updatedfrom_gitmodulesto check"fetchRecurseSubmodules"first, falling back to"fetchRecurse"for backward compatibility:This aligns
from_gitmoduleswith the rest of the codebase (git2_ops.rs,gix_ops.rs,options.rs) which consistently usesfetchRecurseSubmodulesas the git config key.🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.