Repository navigation
fix(vscode): list merge commit files - #1029
Merged
lizhengfeng101 merged 1 commit intoAug 21, 2026
Merged
Conversation
Contributor
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s). |
wu21-web
approved these changes
Aug 21, 2026
Githab-capibara
added a commit
to Githab-capibara/open-code-review
that referenced
this pull request
Sep 17, 2026
8 of 15 tasks
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.
Description
Fix the VS Code Commit mode pending file list for merge commits.
Problem / Reproduction
Affected scenario
When a user selects a merge commit in the VS Code Open Code Review Sidebar's
Commit mode, the Pending Files list is empty. The user cannot start a review
from that list even though the merge commit contains changes.
Reproduction
Using repository baseline
4b6874band the existing merge commit0f0f899:Run the command currently used by the VS Code adapter:
It produces no file entries because Git uses combined diff output for the
merge commit by default.
Run the first-parent equivalent:
It returns the merge commit's changed files, including:
README.ja-JP.md,README.ko-KR.md,README.md,README.ru-RU.md,README.zh-CN.md, andimgs/logo-core.svg.The same behavior is visible in VS Code by opening the Sidebar, switching to
Commit mode, selecting
0f0f899, and observing an empty Pending Files list.Root cause
GitService.getCommitFiles()used Git's default combined diff semantics formerge commits. The Go core already uses first-parent semantics, and
openDiff()compares a commit withcommit^, so the VS Code file list must usethe same contract.
Fix
GitService.getCommitFiles()now uses--diff-merges=first-parentand--end-of-options, matching the Go core andopenDiff()semantics. Ordinarycommit behavior is unchanged.
Type of Change
How Has This Been Tested?
make testpasses locally--no-ffmerge commitThe regression test creates a base commit, diverging feature and main
branches, and a real merge commit. It asserts that
getCommitFiles(mergeSha)returnsfeature.tswith statusadded.Validation completed:
extensions/vscode:npm test -- --runInBand— 101 tests passedextensions/vscode:npm run compilemake checkmake testmake buildocr review --audience agent— 0 findingsChecklist
make checkpassed)Related Issues
Related to #450: the Go core first-parent merge diff fix. This PR aligns the
independent VS Code adapter implementation.