StitchRead-only file history for SVN and Git, for any file you open. It works with or without a workspace folder, on a local disk or a network drive. SVN needs no
Requirements
Stitch HistoryOpen any file under Git or SVN and the Stitch History view in the Explorer shows its history, following renames and copies.
Git: the trunk viewGit history is shown as a trunk with merges you can expand, rather than one long list of every commit:
Incoming changesSVN: revisions on the server, newer than your working copy, that changed the file come first, tagged "incoming". A separator ( Git: when your branch has an upstream (such as The view reloads when the server, your branch or its upstream moves. Stitch checks when the window regains focus and when you switch files. Fetch (Git)The cloud icon in the view title runs
SVN gutter diffs and Open ChangesFor a file in an SVN working copy, Stitch compares the editor with BASE (the copy of the file as you last updated it, which svn keeps in
Stitch adds an empty "SVN (Stitch)" entry per working copy to the Source Control view. That's how VS Code draws gutter markers. The entry has no commit box and no actions. For Git files, the gutter and Open Changes come from VS Code's built-in Git extension. SVN historyHistory is read over http(s) from the server, using the same protocol the svn client uses:
|
| Setting | Default | Description |
|---|---|---|
stitch.logLimit |
40 |
History entries per page |
stitch.timeoutMs |
15000 |
Timeout per git command or server request, in ms |
stitch.svn.urlMap |
{} |
svn:// → http(s) URL prefixes, for SVN history |
stitch.svn.refreshInterval |
60 |
Minimum seconds between automatic server queries for the same file |
stitch.git.path |
git |
The git executable |
stitch.git.fetchExcludePaths |
["/drives/", "/mnt/", "/smb"] |
No Fetch button for repositories under these folders. On Linux, network mounts (cifs, nfs, sshfs, …) are excluded too |
stitch.git.fetchLocalDrives |
["C:", "D:"] |
Windows: Fetch is offered only on these drives, never on UNC paths |
Safety
Read-only by construction, not just by omission:
- Git runs only read subcommands, with repository-configured programs (fsmonitor, textconv, external diff, signature checks) switched off.
- SVN requests to the server are limited to read methods. Anything else is refused before a connection is opened.
.svn/is only read.wc.dbis opened read-only without locks, so svn clients and other tools aren't blocked, which matters on network drives.- Revision content is served from memory. No temporary files are written.
- The test suite checks all of this, including that
.git/and.svn/are byte-for-byte unchanged afterwards.
Restricted Mode (untrusted folders). Stitch stays enabled, because opening a repository with it can't run code from that repository:
- Git's repository-configured programs are switched off, as above. The Fetch button is hidden, since a fetch uses the repository's configured transport (
core.sshCommand, credential helpers), which could run a program. - SVN needs no program at all.
stitch.git.pathandstitch.svn.urlMapare machine-scoped, so a folder's.vscode/settings.jsoncan't change which git runs or where requests go.- Commit messages and paths are shown as plain text.
One thing an untrusted folder can influence: an SVN working copy records its server URL, so opening a file in a crafted working copy makes Stitch send read-only, anonymous requests to that URL. No credentials are ever sent.
Known limitations
Git
- Merges made by
git pullwithout rebase (Merge branch 'main' of …) have their parents swapped, so the first parent is your local work. They're labelled pull merge, and the remote's trunk appears under them. - Repositories that only squash or rebase have no merges, so the view is a flat list.
SVN
- Servers that need a login,
file://repositories, and servers older than 1.7 aren't supported for history. The view says which applies. - Incoming revisions are found by the file's current path. If the file moved on the server, they aren't listed (the separator says the path is gone).
$Date$is expanded in your local time zone. If the client that last updated the file ran in a different zone, that line shows as changed.- Property-only changes don't count as modifications.
- svn 1.15 working copies without pristine copies (
store-pristine = no) and svn ≤ 1.3 working copies aren't supported.
Troubleshooting
- See what Stitch is doing: Output panel → Stitch. Every git command and server request is logged with its result and timing.
- "Server unreachable" or a timeout: check the URL in the log. Stitch tries again when the window regains focus, or press Refresh. For slow servers or shares, raise
stitch.timeoutMs. - "Add a URL mapping for svn://…": the working copy was checked out with
svn://; see above. "Points at a different repository" means the mapped URL serves another repository. - "The server needs a login": only anonymous read is supported.
- "The working copy may be damaged" or "looks incomplete": run
svn cleanupin it (or check out again). Stitch shows the suggestion but never runs it. - git "refuses to read this repository because another user owns it" (common on network shares): run the
git config --global --add safe.directory …command shown. Stitch never runs it for you. - Gutter or history out of date after an
svn update, commit orgit pullin a terminal: Stitch doesn't use file watchers, which are unreliable on network drives. It checks again when the window regains focus, when you save, when you switch files, and on Refresh.
Install from a VSIX
npm install
npm run package # → dist/stitch-<version>.vsix
code --install-extension dist/stitch-<version>.vsix
Or, in VS Code: Extensions view → … → Install from VSIX….
Development
npm install
npm test # needs git and tar; the SVN server tests use podman and are skipped without it
npm run build # bundle to dist/
Press F5 in VS Code to run the extension in a development host. See docs/CONTEXT.md for how Stitch is built and why.