Repository navigation
Conversation
A person's diff.submodule setting reshaped the patch: "log" dropped the submodule's diff header, so the review was refused as an invalid diff, and "diff" inlined the submodule's own files, which passed the header check and were uploaded in place of the gitlink change. Pin --submodule=short beside the other settings the server depends on. Fixes prooflinedev#105. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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 #105.
Who it helps
Anyone who runs
proofline reviewon local changes in a repository with submodules, withdiff.submoduleset in their git config.logmakes the review refuse to start with an invalid-diff error.diffis worse: the review starts and uploads the submodule's own files in place of the submodule change.What changes
diff()insrc/git.rspasses--submodule=short, next to the other settings it pins because the server depends on them. A moved submodule is always the oneSubproject commitchange, whatever the person's git config says. Without the setting, the patch is the same as before.Decisions
-csetting.--submodule=shorton the command line overridesdiff.submoduleand needs no config key.diff(), which builds every patch. Local changes and pushed commits both go through it, so both are covered.How I verified it
src/git.rsmoves a submodule and setsdiff.submoduletoshort,loganddiffin turn. Each time, the patch must have one header,diff --git a/lib b/lib, with aSubproject commithunk and none of the submodule's file contents. Without the flag,logfails as an invalid diff, anddiffgives["diff --git a/lib/f b/lib/f"].cargo fmt --check,cargo clippy --locked --all-targets -- -D warnings,cargo test --locked(157 passed, 1 ignored; 156 before) andcargo deny checkwith cargo-deny 0.20.2 all pass.cargo mutants --in-diff: 1 mutant, killed.🤖 Generated with Claude Code