rebase-branch: mark up range-diffs with ```diff code blocks#157
Open
rebase-branch: mark up range-diffs with ```diff code blocks#157
Conversation
The range-diffs presented to the user in the conflict report and in the PR body are currently wrapped in plain triple-backtick code blocks, which renders them as monochrome text. By using ```diff fenced code blocks instead (one per range-diff entry), GitHub's Markdown renderer applies diff-style syntax highlighting, making additions, deletions, and context lines visually distinct (not full range-diff coloring, but noticeably more readable than plain text). The markup logic is the same sed pipeline used in the "Rebase to Git <version>" PRs at git-for-windows/git, split into two functions: `range_diff_with_markup` runs `git range-diff` with the given arguments and pipes through the markup, propagating failure from range-diff itself; `markup_range_diff` applies just the sed pipeline to already-produced range-diff text on stdin, which is needed for the final summary range-diff that gets annotated with upstream OIDs between generation and rendering. Only the three user-facing range-diff sites are affected (per-skip, per-resolution, and final summary). The correspondence-map generation and AI agent prompts remain untouched. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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.
The range-diffs in the shears-builds PRs (e.g. git-for-windows/shears-builds#12) are currently rendered as plain monochrome text. By wrapping each range-diff entry in ```diff fenced code blocks instead, GitHub applies diff-style syntax highlighting, making them noticeably more readable. This is the same markup used in the "Rebase to Git " PRs at git-for-windows/git.
All three user-facing range-diff sites are updated (per-skip, per-resolution, and final summary); the correspondence-map generation and AI agent prompts are untouched.