Repository navigation
fix(diff): show submodules as a summary row and never mark them reviewed - #403
Merged
Merged
Conversation
A submodule change rendered as ordinary "Subproject commit" add/remove rows, so each submodule scored +1 -1 and could be marked reviewed, with the mark surviving a reload. The git renderer now replaces those rows with one placeholder row flagged IsSubmodule, after confirming the 160000 gitlink mode through git diff --raw for the same comparison; the rows alone cannot tell a submodule from a regular file holding that text, and a dirty submodule whose pointer has not moved carries no mode in its patch. --submodule=short keeps a diff.submodule=log setting from changing the rows. The row is a context placeholder, so it adds nothing to the counts. Marking a submodule reviewed is refused with a status-bar hint on every path: the displayed file, a file not loaded yet, and a file loaded earlier. Fixed #350
An empty diff counted as a possible submodule, so every untracked, staged-only or mode-only file paid an extra git diff --raw call. Empty parsed diffs now trigger the raw check only for renames or combined merge-conflict patches. An unresolved submodule merge conflict was labelled "pointer unchanged"; it now reads as an unresolved merge conflict and stays unreviewable. A test also pins that a key press clears the refusal hint.
Deploying revdiff with
|
| Latest commit: |
d21a311
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://303de79f.revdiff.pages.dev |
| Branch Preview URL: | https://gitlink-not-reviewable.revdiff.pages.dev |
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.
Implements the part of #350 agreed in the thread: a submodule is explicit in the UI and never counts as reviewed source content. Recursive submodule support stays out, as discussed there. Git only; hg and jj are unchanged.
Subproject commitadd/remove rows with a single placeholder row flaggedIsSubmodule: moved pointer, new or deleted submodule, a rename with the pointer unchanged, or an unresolved merge conflict. The rows alone cannot tell a submodule from a regular file holding that text, so the 160000 gitlink mode is confirmed throughgit diff --rawfor the same comparison. A dirty submodule whose pointer has not moved carries no mode in its patch, which is why the patch alone is not enough.--submodule=shortkeeps adiff.submodule=logsetting from changing the rows.+1 -1per submodule. The row is a context placeholder, so it adds nothing to the counts or the review stats.Spaceon a submodule is refused with a status-bar hint on every path: the displayed file, a file not loaded yet, and a file loaded earlier. A mark it already held is dropped when it loads.--rawcall; ordinary empty diffs do not.Tests build real superprojects: moved, dirty-unmoved, added, deleted, renamed, against a ref, with
diff.submodule=log, and an unresolved merge conflict; a regular file holding pointer text stays a normal diff; the UI refusal is covered on all three marking paths.Fixed #350