Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
34 changes: 33 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## 0.1.0
## 0.1.3

### Added
- Repository detection via `git rev-parse --is-inside-work-tree`; the panel now renders a dedicated "Create Git Repository" view when the project is not yet a Git repository.
- One-click repository initialization (`git init`) directly from the panel.
- VS Code-style staging: a per-file `+` button in the Changes list, plus a "Stage all" action.
- Unstaging via a per-file `-` button, including support for repositories with no commits yet.
- Commit workflow with a persistent message buffer, empty-message validation, and immediate status refresh after commit.
- Manual refresh button to force `git status` without waiting for the throttle interval.
- Files with dual status (e.g. `AM`) are now shown in both "Staged Changes" and "Changes", matching `git status` behavior.
### Planned
- Branch display and switching.
- File status coloring (Modified / Added / Deleted / Untracked).
- Discard changes action for unstaged files.
- Push / Pull controls.
- Diff preview for tracked files.
- Asynchronous `git status` execution to keep the editor responsive on large repositories.

### Fixed
- Engine crash caused by calling `subprocess` synchronously from `on_enable`; Git detection is now performed lazily during the first render.
- `exit status 128` when `git status` was executed outside a repository or in the wrong working directory.
- Duplicate ImGui item IDs (`duplicate visible item ID`) caused by repeated `+` / `-` button labels inside loops.
- `Missing EndGroup()` errors when rendering was interrupted by an exception; `end_group()` is now guaranteed via `try/finally`.
- Commit button being a no-op because `text_input` reset its value to a placeholder every frame.
- "Stage all" button not responding due to overlapping with the collapsing header's hit area.

### Changed
- Working directory is now always passed explicitly via `cwd=` to every Git subprocess.
- `files_status_list` replaced with three independent collections (`staged_files`, `unstaged_files`, `untracked_files`), allowing a single file to appear in multiple states simultaneously.
- Status parsing now uses `git status --porcelain` and updates the lists atomically, preserving the last known state on transient failures.
- `git status` refresh is throttled to once per second to avoid spawning a subprocess every frame.

## 0.1.2

- Refactor example plugin name.
34 changes: 33 additions & 1 deletion CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# 更新日志

## 0.1.1
## 0.1.3

### 新增
- 使用 `git rev-parse --is-inside-work-tree` 检测仓库;项目尚未初始化 Git 时,面板会显示独立的「创建 Git 仓库」界面。
- 可在面板中一键初始化仓库(`git init`)。
- 仿 VS Code 的暂存操作:Changes 列表每个文件右侧提供 `+` 按钮,并提供「Stage all」整体暂存。
- 支持逐个文件取消暂存(`-` 按钮),兼容尚无任何提交的仓库。
- 提交流程:持久化提交消息缓冲区、空消息校验,以及提交后立即刷新状态。
- 手动刷新按钮,可绕过节流间隔强制执行 `git status`。
- 双状态文件(如 `AM`)现在会同时出现在「Staged Changes」与「Changes」中,与 `git status` 的行为一致。
### 计划
- 分支显示与切换。
- 文件状态着色(Modified / Added / Deleted / Untracked)。
- 未暂存文件的「放弃更改」(Discard changes)操作。
- Push / Pull 控制。
- 已跟踪文件的 Diff 预览。
- 异步执行 `git status`,在大仓库中保持编辑器响应。

### 修复
- 在 `on_enable` 中同步调用 `subprocess` 导致引擎崩溃;Git 探测改为首次渲染时惰性执行。
- 在仓库外或错误工作目录中执行 `git status` 时返回 `exit status 128`。
- 循环内 `+` / `-` 按钮标签重复导致的 ImGui ID 冲突(`duplicate visible item ID`)。
- 渲染中途抛异常导致 `Missing EndGroup()`;现通过 `try/finally` 保证 `end_group()` 一定被调用。
- `text_input` 每帧把值重置为占位文本,导致提交按钮无效。
- 「Stage all」按钮与折叠标题点击区域重叠导致无响应。

### 变更
- 所有 Git 子进程调用现在都通过 `cwd=` 显式指定工作目录。
- 以 `staged_files`、`unstaged_files`、`untracked_files` 三个独立集合取代 `files_status_list`,允许同一文件同时处于多个状态。
- 状态解析改用 `git status --porcelain`,并以原子方式更新列表;临时失败时保留上一次的已知状态。
- `git status` 刷新节流为每秒最多一次,避免每帧启动子进程。

## 0.1.2

- 重建插件引擎实例名称。
14 changes: 4 additions & 10 deletions package/editor/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@
"$schema": "infernux.editor_translations",
"locales": {
"en": {
"wokrlie.git_integration.menu_diagnostics": "Diagnostics",
"wokrlie.git_integration.menu_live": "Live",
"wokrlie.git_integration.menu_root": "Example Plugin",
"wokrlie.git_integration.menu_tools": "Tools",
"wokrlie.git_integration.panel_title": "Example Plugin"
"wokrlie.git_integration.menu_root": "Git Integration",
"wokrlie.git_integration.panel_title": "Git Integration"
},
"zh": {
"wokrlie.git_integration.menu_diagnostics": "诊断",
"wokrlie.git_integration.menu_live": "实时",
"wokrlie.git_integration.menu_root": "示例插件",
"wokrlie.git_integration.menu_tools": "工具",
"wokrlie.git_integration.panel_title": "示例插件"
"wokrlie.git_integration.menu_root": "Git集成",
"wokrlie.git_integration.panel_title": "Git集成"
}
}
}
Loading
Loading