Skip to content

fix: SPDX headers in CLAUDE.md; delegate SerializableBranch deserialization to from_gitmodules#36

Merged
bashandbone merged 3 commits intofeat/test-expansionfrom
copilot/sub-pr-33
Mar 19, 2026
Merged

fix: SPDX headers in CLAUDE.md; delegate SerializableBranch deserialization to from_gitmodules#36
bashandbone merged 3 commits intofeat/test-expansionfrom
copilot/sub-pr-33

Conversation

Copy link
Contributor

Copilot AI commented Mar 19, 2026

Two review-driven fixes: missing license headers in CLAUDE.md and a deserialization gap in SerializableBranch that silently accepted invalid input.

Changes

  • CLAUDE.md: Restore SPDX FileCopyrightText + LicenseIdentifier header block (HTML comment, matching README.md/CONTRIBUTING.md convention).

  • SerializableBranch::deserialize: Delegate to from_gitmodules instead of FromStr.

    • FromStr accepted empty/whitespace strings, producing Name("") silently.
    • from_gitmodules trims input, rejects empty/whitespace with Err(()), and matches the live superproject branch name as a CurrentInSuperproject alias.
// Before: FromStr accepted "" → Name(""), no trimming
SerializableBranch::from_str(&s)
    .map_err(|_| serde::de::Error::custom(...))

// After: from_gitmodules trims, rejects empty, handles superproject alias
SerializableBranch::from_gitmodules(&s)
    .map_err(|_| serde::de::Error::custom(...))

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@bashandbone bashandbone marked this pull request as ready for review March 19, 2026 14:02
Copilot AI review requested due to automatic review settings March 19, 2026 14:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…ialization to from_gitmodules

Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
@bashandbone bashandbone requested a review from Copilot March 19, 2026 14:03
Copy link
Contributor Author

Copilot AI commented Mar 19, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • invalid-host
    • Triggering command: /home/REDACTED/work/submod/submod/target/debug/submod /home/REDACTED/work/submod/submod/target/debug/submod add git@invalid-host:user/repo.git --name invalid-test --path lib/invalid rgo/bin/git . (dns block)
    • Triggering command: /usr/bin/ssh /usr/bin/ssh -o SendEnv=GIT_PROTOCOL git@invalid-host git-upload-pack &#39;user/repo.git&#39; deinit --all de/node/bin/git (dns block)
  • nonexistent.domain.invalid
    • Triggering command: /home/REDACTED/work/submod/submod/target/debug/submod /home/REDACTED/work/submod/submod/target/debug/submod add REDACTED --name invalid-test --path lib/invalid /home/REDACTED/.local/bin/git ork test@example.comconfig k/_temp/ghcca-nouser.email git conf�� user.name Test User rgo/bin/git user.email test@example.comconfig /usr/local/.ghcuuser.email git (dns block)
    • Triggering command: /usr/lib/git-core/git-remote-http /usr/lib/git-core/git-remote-http origin REDACTED git subm�� deinit --all tnet/tools/git HEAD nuke_reinit.git k/submod/submod/--all git comm�� -m Initial commit /usr/local/.ghcup/bin/git -m Add dev featuresconfig git git (dns block)
  • nonexistent.invalid.domain.test
    • Triggering command: /home/REDACTED/work/submod/submod/target/debug/submod /home/REDACTED/work/submod/submod/target/debug/submod add REDACTED --name timeout-test --path lib/timeout e config_test_workgit main e git clea�� e/git-submodule git tnet/tools/git git git git git (dns block)
    • Triggering command: /usr/lib/git-core/git-remote-http /usr/lib/git-core/git-remote-http origin REDACTED git comm�� -m Add test content target/debug/submod -m Add test contentconfig /usr/bin/git target/debug/subtest@example.com conf�� d/repo.git protocol.file.allow nfig/composer/vendor/bin/git --global (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix serialization/deserialization issue and expand testing fix: SPDX headers in CLAUDE.md; delegate SerializableBranch deserialization to from_gitmodules Mar 19, 2026
Copilot AI requested a review from bashandbone March 19, 2026 14:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates config branch deserialization to use the same parsing rules as .gitmodules conversion and adds SPDX headers to documentation, as follow-up work to PR #33’s review feedback.

Changes:

  • Delegate SerializableBranch deserialization to GitmodulesConvert::from_gitmodules() and tighten behavior around empty/whitespace values.
  • Add SPDX header block to CLAUDE.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/options.rs Adjusts SerializableBranch deserialization to share .gitmodules parsing logic and error on invalid inputs.
CLAUDE.md Adds SPDX header block in the repo’s standard Markdown format.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@bashandbone bashandbone merged commit 05bcaf3 into feat/test-expansion Mar 19, 2026
@bashandbone bashandbone deleted the copilot/sub-pr-33 branch March 19, 2026 14:27
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>
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.

3 participants