Opening a submodule bump in the PR changes view fails: "Unable to read file ... that is actually a directory"
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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)
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.6k
- Forks
- 805
- Ø Merge
- 1 T. 12 Std.
- Gemergte PRs (30 T.)
- 39
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/vscode-pull-request-github
-
Issue 3 — DocumentationOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
microsoft/vscode-pull-request-github#8792 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 50/100
microsoft/vscode-pull-request-github#9063 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Configurable issue completion triggerEvtl. vergeben @alexr00 hat das heute übernommen. Offen
microsoft/vscode-pull-request-github#9062 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Branch deletion modal (0.168.0): "Delete All" reads as deleting the repository, and single deletes need two tripsEvtl. vergeben @alexr00 hat das vor 1 Tag übernommen. Offen
microsoft/vscode-pull-request-github#9060 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Add mermaid support or use the same markdown render that is used by vscodeEvtl. vergeben @alexr00 hat das vor 1 Tag übernommen. Offen
microsoft/vscode-pull-request-github#9059 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in microsoft/vscode-pull-request-github
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
one-zero-eight/apply-bot#39 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
bigbluebutton/bbb-ui-components-react#108 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
Maintainer antworten meist innerhalb von 1 Tag
-
high priority
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
CI-CMG/deep-sea-corals-exb#84 · 1 Kommentar ·