Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3048325
[WIP] Web view
emanuelen5 Oct 27, 2026
9b21b93
Fix: do not relayout when showing loading
emanuelen5 Nov 13, 2026
655045b
Focus the web view when opened or moved
emanuelen5 Nov 13, 2026
c90fb9c
Abbreviate an upstream with the same name as the branch
emanuelen5 Nov 13, 2026
ed4da38
Add a changelog entry
emanuelen5 Nov 13, 2026
e762031
Only rerender changed rows
emanuelen5 Nov 18, 2026
6ccc515
Preserve unchanged webview snapshot references
emanuelen5 Nov 18, 2026
86d3ef6
Keep patch row identity stable across push and pop
emanuelen5 Nov 18, 2026
72fe4bb
Cache commit file lookups by SHA
emanuelen5 Nov 18, 2026
c2440ca
Prefetch commit files after publishing listed rows
emanuelen5 Nov 18, 2026
3cb8dff
Preserve newer cursor movement during background loads
emanuelen5 Nov 18, 2026
7223edb
Separate background snapshots from cursor navigation
emanuelen5 Nov 18, 2026
3e4b24e
Simplify webview selection and focus bookkeeping
emanuelen5 Nov 18, 2026
d073f94
Fix: make file status rows unique on conflict
emanuelen5 Nov 18, 2026
49a568d
Save/restore state on teardown of webview
emanuelen5 Nov 26, 2026
b4fb5e1
Do not reload after commands that only change the view
emanuelen5 Nov 27, 2026
b384a57
Show file counts without expanding rows
emanuelen5 Nov 27, 2026
39ad10c
Fix: reopen the pane after closing it during a git reload
emanuelen5 Nov 27, 2026
d05ceec
Make the commit message editor larger by default
emanuelen5 Nov 27, 2026
6b1ddb8
Show the submodule marker as a colored tag before the path
emanuelen5 Nov 27, 2026
e31dec1
Write commit messages in a text editor under the StGit pane
emanuelen5 Nov 28, 2026
638ccc5
Mark empty patches and patches without a commit message
emanuelen5 Nov 28, 2026
c941c52
Install stgit in CI, needed for integration tests
emanuelen5 Nov 30, 2026
9f4b52f
Quiet the integration test output
emanuelen5 Nov 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ jobs:
- name: Run the unit tests
run: npm run test:unit

- name: Install StGit
# The integration tests run stg. Distributions ship old releases, so take one from upstream.
run: |
cd "$RUNNER_TEMP"
curl -fsSLO https://github.com/stacked-git/stgit/releases/download/v2.5.0/stgit_2.5.0-1_amd64.deb
echo "cf9db4b68c4b45dbfe01f537f119a9c6fa234719ac337b36cfeed5d5933d33e8 stgit_2.5.0-1_amd64.deb" | sha256sum -c -
sudo apt-get install -y ./stgit_2.5.0-1_amd64.deb
stg --version

- name: Run the integration tests
# VS Code needs a display, even when only running tests.
run: xvfb-run -a node ./out/test/runTest.js
Expand Down
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
"preLaunchTask": "stgit: debug"
},
{
"name": "Run Extension (Clean)",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}", "--disable-extensions"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
"preLaunchTask": "stgit: debug"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}", "--extensionTestsPath=${workspaceFolder}/out/test/suite/index"],
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
"preLaunchTask": "stgit: debug"
}
]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"chat.tools.terminal.autoApprove": {
"./node_modules/.bin/eslint": true,
"git check-ignore": true
}
}
22 changes: 21 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,23 @@
"version": "2.0.0",
"tasks": [
{
"label": "stgit: compile",
"type": "npm",
"script": "compile",
"problemMatcher": "$tsc"
},
{
"label": "stgit: watch",
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"problemMatcher": {
"base": "$tsc-watch",
"background": {
"activeOnStart": true,
"beginsPattern": "^\\[0\\].*(Starting compilation in watch mode|File change detected\\. Starting incremental compilation)",
"endsPattern": "^\\[0\\].*Found [0-9]+ errors?\\. Watching for file changes\\."
}
},
"isBackground": true,
"presentation": {
"reveal": "never"
Expand All @@ -15,6 +29,12 @@
"kind": "build",
"isDefault": true
}
},
{
"label": "stgit: debug",
"dependsOrder": "sequence",
"dependsOn": ["stgit: compile", "stgit: watch"],
"problemMatcher": []
}
]
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ repository. Changes up to that version are documented in its

## [Unreleased]

### Changed

- The stgit buffer is now a web view with stricter controls of navigation. This obviates a bunch of issues with overloaded keyboard shortcuts and vim mode quirks.
- Commit messages are written in a text editor under the StGit window instead of a text box in it, so editor shortcuts and vim mode work. It shows the same template as `stg new` and `stg edit`, where the patch name and author can be changed too, and highlights the message as Markdown. The editor is kept under the StGit window when it is moved or covered. `Ctrl-Enter` or `Ctrl-C Ctrl-C` commits and always closes the editor; should StGit fail, the error offers to edit the message again.
- Patches and commits with an empty commit message are marked with a "no message" tag instead of showing an empty row, and patches without changes with an "empty" tag.

### Fixed

- Expanding or collapsing patches, marking patches, viewing diffs and opening or cancelling the commit message editor no longer reload the patch series, index and work tree. Since 1.0.1, every command did.

## [1.1.2] - 2026-11-10

### Fixed
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ Install [StGit Revived](https://marketplace.visualstudio.com/items?itemName=cede

## Features

The StGit patch series is displayed in a window. StGit and Git operations, bound to various keyboard shortcuts, allow the series to be reworked as desired.
The StGit patch series is displayed as a table in a webview. Status symbols distinguish applied and popped patches as well as modified, added, deleted, and conflicted files. A loading indicator appears while StGit commands or status reads are running. StGit and Git operations are available through the existing keyboard shortcuts when the webview is focused.

Use the arrow keys to select patches and files, Enter to expand a patch or open a file, and `m`/`u` to mark or unmark patches.

Commit messages (`c` for a new patch, `e` to edit the selected one) are written in a text editor that opens under the StGit window, so your own editor setup, such as vim mode, works in it. It shows the same template as `stg new` and `stg edit`: the patch name, author and date above the message can be changed too, and lines starting with `#` are left out. Commit with `Ctrl-Enter`, `Ctrl-C Ctrl-C` or the Commit button, or save and close the editor. Close the editor without saving, or use the Cancel button, to cancel. Committing always closes the editor: as with `stg new`, an empty message creates no patch, while an existing patch may be given an empty message. Should StGit fail, the error offers to edit the message again. The editor stays under the StGit window: when it is moved elsewhere or covered by another tab, it is put back.

The extension also provides an Emacs-like diff mode, which among other things allows individual hunks to be applied, staged or split into smaller hunks.

While the StGit window is open, it follows the repository of the active file, including files in submodules.

![Example](images/example.png)

> [!TIP]
>
> To enter StGit, press `Ctrl-C Ctrl-I` or run the "`StGit: Open...`"
Expand All @@ -40,9 +42,13 @@ This extension requires StGit to be installed (the executable is called `stg`).

Git history entries use the effective `format.pretty` Git configuration. Custom `format:` and `tformat:` values and named `pretty.<name>` aliases are supported. Multiline output is flattened to one line, and terminal colors are omitted. If no reusable one-line format is configured, the extension uses `%h %s`.

## Development

Starting any Extension Development Host debug configuration builds both the extension and the React webview before starting the background watch task. Subsequent webview JS/CSS rebuilds automatically reload the open StGit panel in the development host, preserving its selection and scroll position. For extension-host code changes, reload the Extension Development Host window to load the newly compiled code. Run `npm run compile` for a one-off build or `npm run watch` outside debugging; restart an older watch process after changing the build scripts. `npm run test:unit` includes a DOM test of the compiled webview; `npm test` runs the VS Code extension-host suite when its test executable is available.

## Known Issues

The StGit extension can be used together with the popular Vim mode for VsCode, but there are currently a few key mapping conflicts for the StGit editor.
Vim extensions may intercept some StGit keyboard shortcuts in the webview. Closing the StGit tab while editing a commit message closes the message editor and discards the message; cancel the message before closing to get a confirmation.

## Release Notes

Expand Down
Loading