Opening a submodule bump in the PR changes view fails: "Unable to read file ... that is actually a directory"
@alexr00 がすでに取り組んでいます。
2026年9月24日 から。
評価
この issue はまだ評価されていません。
説明
Description
When a PR bumps a git submodule (a 160000 gitlink tree entry), clicking that file in the PR's changed-files list fails to open, instead of showing a diff of the submodule commit pointer (old SHA → new SHA).
Error
The editor could not be opened due to an unexpected error. Please consult the log for more details.
From remoteexthost.log (Remote-SSH):
CodeExpectedError: cannot open vscode-remote://ssh-remote+<host>/<path>/<submodule-dir>. Detail: Unable to read file 'vscode-remote://ssh-remote+<host>/<path>/<submodule-dir>' (Error: Unable to read file 'vscode-remote://ssh-remote+<host>/<path>/<submodule-dir>' that is actually a directory)
at THe.$tryOpenDocument (.../workbench.desktop.main.js:699:10890)
Root cause (from log inspection)
The extension calls vscode.open() on the submodule's literal filesystem path — the same as for a normal changed file — instead of constructing a diff/content-provider URI. Since a submodule tree entry has no blob content of its own (it's a directory containing a nested checkout), the remote file service stats it, finds a directory, and throws EISDIR.
Separately, in another context (opening the same kind of change from the PR description's "Changes" webview), the extension does construct a pr: scheme URI with baseCommit/headCommit/fileName, e.g.:
pr:/<path>?{"baseCommit":"<sha>","headCommit":"<sha>","isBase":false,"fileName":"<submodule-path>","prNumber":<n>,"status":3,"remoteName":"origin"}
but this fails too, with a different error:
CodeExpectedError: cannot open pr:/<path>?{...}. Detail: Could not show object.
So neither code path currently special-cases gitlink (160000) entries — one falls back to opening the raw directory, the other tries to fetch blob content for a commit pointer that has none.
Expected behavior
Clicking a submodule entry in the PR changes view should show a minimal diff of the submodule pointer, e.g.:
Subproject commit <old-sha>
Subproject commit <new-sha>
(similar to git diff output for a submodule, and to how github.com renders it in the PR's "Files changed" tab).
Environment
- Extension:
github.vscode-pull-request-githubv0.167.2026092404 - VS Code Remote - SSH
- Linux remote host
Related issues
- #1499 ("We couldn't find commit" when submodules exist) — same underlying gap, different surfaced error
- #4688 (Add support for git submodules)
- 主要言語
- TypeScript
- スター
- 2.6k
- フォーク
- 796
- 平均マージ
- 14時間 34分
- マージ済み PR(30日)
- 43
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/vscode-pull-request-github のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
microsoft/vscode-pull-request-github#8982 · 担当者 1 名 ·
-
microsoft/vscode-pull-request-github#8980 · 担当者 1 名 ·
-
bug description page issues performance
microsoft/vscode-pull-request-github#8979 · 担当者 1 名 ·
microsoft/vscode-pull-request-github の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
TanStack/tanstack.com#1293 ·