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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

### Added

- **Log 视图升级为 IDEA 风格提交图(Graph DAG)**:`hyperGit.log` 由原生 TreeView(`log-tree.ts`)迁移为 Webview,基于 commit 父子关系**自计算 DAG lane 布局**,完整复刻 IntelliJ IDEA Git Log 的彩色泳道 / 节点 / 分叉·合并连线 / HEAD·分支·标签标签——不再依赖 `git log --graph` 的粗糙 ASCII(lane 由 git 分配、不可控、随列号抖动着色)。新增纯逻辑引擎 `engine/log/graph-layout.ts`(单遍增量 lane 状态机,nil-slot 复用保证分支「直顺」;`graph-color.ts` 沿首父链继承 + 相邻 lane 异色;覆盖 octopus 合并 / 多 root / 收敛 / 截断 dangling 边)、`log-line.ts`(NUL/RS 解析)与 `log-query.ts`(`--topo-order` 保拓扑序;author/grep/path 服务端 + mergeMode/date/regex 客户端复用 `applyClientFilters`),单测 29 例全覆盖。Webview 端虚拟化「每行内联 SVG + 文本列」渲染、主题调色板(`--vscode-` 令牌 + hex 回退)、All/Current 范围切换、滚动增量加载、↑↓ 键导航、选中提交内联展示变更文件(点击打开 diff)、右键 per-commit 操作菜单(复用既有 9 个命令)。移除独立的 `showGraph` 面板与 `graph-parser`(单一事实源去重);新增 `LogFilterControl` 接口使 4 个命令注册器零行为改动完成迁移。
- **Branches 视图多选 + 批量操作**:`hyperGit.branches` 由 `registerTreeDataProvider` 改用 `createTreeView({ canSelectMany: true })`,支持 Ctrl/Cmd/Shift 框选多个分支/标签。批量命令作用于整个选区:**删除分支**(一次 `git branch --merged` 分类已合并/未合并,单条确认弹窗诚实分栏呈现强制删除风险,逐个删除并汇总成功/失败)、**删除标签**、**复制引用**(按行连接)、**收藏切换**。仅单目标语义的操作(检出/合并/变基/重命名/比较)经 `!listMultiSelection` 在多选时从右键菜单隐藏,且因仅读「右键点击项」而始终安全。新增纯逻辑 `engine/ref/selection.collectBranchRefs`(选区归一化 + 「点击在选区之外」手势优先)与 `engine/ref/cleanup` 的 `partitionByMerged`/`formatBranchDeleteConfirm`/`truncateNames`,单测全覆盖。

## [0.0.1-rc.4] - 2026-06-29 — 第四个预发布候选
Expand Down
14 changes: 1 addition & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
{
"id": "hyperGit.log",
"name": "Log",
"type": "webview",
"visibility": "visible"
},
{
Expand Down Expand Up @@ -160,7 +161,6 @@
{ "command": "hyperGit.logFilterDate", "title": "按日期过滤", "category": "Hyper Git" },
{ "command": "hyperGit.logFilterRegex", "title": "按 message 正则过滤", "category": "Hyper Git" },
{ "command": "hyperGit.rewordCommit", "title": "改写最新提交信息", "category": "Hyper Git" },
{ "command": "hyperGit.showGraph", "title": "查看提交图(Graph)", "category": "Hyper Git", "icon": "$(git-commit)" },
{ "command": "hyperGit.showConsole", "title": "打开 Console", "category": "Hyper Git" },
{ "command": "hyperGit.partialStage", "title": "部分暂存(Hunk)…", "category": "Hyper Git" },
{ "command": "hyperGit.partialUnstage", "title": "部分取消暂存(Hunk)…", "category": "Hyper Git" },
Expand Down Expand Up @@ -215,9 +215,6 @@
{ "command": "hyperGit.createPatch", "when": "view == hyperGit.changes" },
{ "command": "hyperGit.applyPatch", "when": "view == hyperGit.changes" },
{ "command": "hyperGit.refreshLog", "when": "view == hyperGit.log", "group": "navigation" },
{ "command": "hyperGit.showGraph", "when": "view == hyperGit.log", "group": "navigation" },
{ "command": "hyperGit.cherryPick", "when": "view == hyperGit.log", "group": "navigation" },
{ "command": "hyperGit.revertCommit", "when": "view == hyperGit.log", "group": "navigation" },
{ "command": "hyperGit.resetHead", "when": "view == hyperGit.log", "group": "navigation" },
{ "command": "hyperGit.logFilterAuthor", "when": "view == hyperGit.log" },
{ "command": "hyperGit.logFilterPath", "when": "view == hyperGit.log" },
Expand Down Expand Up @@ -251,7 +248,6 @@
{ "command": "hyperGit.moveChangelist", "when": "view == hyperGit.changes && viewItem == hyperGit.fileChange", "group": "1_file@1" },
{ "command": "hyperGit.showHistory", "when": "view == hyperGit.changes && viewItem == hyperGit.fileChange", "group": "1_file@2" },
{ "command": "hyperGit.discardChanges", "when": "view == hyperGit.changes && viewItem == hyperGit.fileChange", "group": "1_file@3" },
{ "command": "hyperGit.copyCommitHash", "when": "view == hyperGit.log && viewItem == hyperGit.commit", "group": "1_commit@1" },
{ "command": "hyperGit.branchCheckout", "when": "view == hyperGit.branches && viewItem =~ /hyperGit.branch|hyperGit.remoteBranch/ && !listMultiSelection", "group": "1_branch@1" },
{ "command": "hyperGit.branchDelete", "when": "view == hyperGit.branches && viewItem == hyperGit.branch", "group": "1_branch@2" },
{ "command": "hyperGit.mergeBranch", "when": "view == hyperGit.branches && viewItem =~ /hyperGit.branch|hyperGit.remoteBranch/ && !listMultiSelection", "group": "1_branch@3" },
Expand All @@ -265,14 +261,6 @@
{ "command": "hyperGit.compareWithCurrent", "when": "view == hyperGit.branches && viewItem =~ /hyperGit.branch|hyperGit.remoteBranch|hyperGit.tag/ && !listMultiSelection", "group": "1_branch@8" },
{ "command": "hyperGit.tagCheckout", "when": "view == hyperGit.branches && viewItem == hyperGit.tag && !listMultiSelection", "group": "1_tag@1" },
{ "command": "hyperGit.tagDelete", "when": "view == hyperGit.branches && viewItem == hyperGit.tag", "group": "1_tag@2" },
{ "command": "hyperGit.cherryPick", "when": "view == hyperGit.log && viewItem == hyperGit.commit", "group": "1_commit@1" },
{ "command": "hyperGit.revertCommit", "when": "view == hyperGit.log && viewItem == hyperGit.commit", "group": "1_commit@2" },
{ "command": "hyperGit.dropCommit", "when": "view == hyperGit.log && viewItem == hyperGit.commit", "group": "1_commit@3" },
{ "command": "hyperGit.fixupCommit", "when": "view == hyperGit.log && viewItem == hyperGit.commit", "group": "1_commit@4" },
{ "command": "hyperGit.createBranchFromCommit", "when": "view == hyperGit.log && viewItem == hyperGit.commit", "group": "1_commit@5" },
{ "command": "hyperGit.createTagFromCommit", "when": "view == hyperGit.log && viewItem == hyperGit.commit", "group": "1_commit@6" },
{ "command": "hyperGit.showContainingBranches", "when": "view == hyperGit.log && viewItem == hyperGit.commit", "group": "1_commit@7" },
{ "command": "hyperGit.resetToHere", "when": "view == hyperGit.log && viewItem == hyperGit.commit", "group": "1_commit@8" },
{ "command": "hyperGit.ignorePath", "when": "view == hyperGit.changes && viewItem == hyperGit.fileChange", "group": "1_file@4" },
{ "command": "hyperGit.partialStage", "when": "view == hyperGit.changes && viewItem == hyperGit.fileChange", "group": "1_file@5" },
{ "command": "hyperGit.partialUnstage", "when": "view == hyperGit.changes && viewItem == hyperGit.fileChange", "group": "1_file@6" },
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/advanced-commands.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as vscode from 'vscode';
import type { BranchNode, BranchesTreeProvider } from './tree/branches-tree';
import type { GitRepositoryService } from './git-repository-service';
import type { LogNode } from './tree/log-tree';
import type { LogNode } from './webview/log-webview';
import { filterMergeable } from '../engine/ref/cleanup';
import { selectedBranchRefs } from './branch-selection';

Expand Down
4 changes: 2 additions & 2 deletions src/adapter/git-cli-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as path from 'path';
import * as vscode from 'vscode';
import type { BranchNode, BranchesTreeProvider } from './tree/branches-tree';
import type { ChangeItem, GitRepositoryService } from './git-repository-service';
import type { LogNode, LogTreeProvider } from './tree/log-tree';
import type { LogFilterControl, LogNode } from './webview/log-webview';
import { handleGitConflict } from './conflict-ui';

const errMsg = (e: unknown): string => (e instanceof Error ? e.message : String(e));
Expand All @@ -12,7 +12,7 @@ const errMsg = (e: unknown): string => (e instanceof Error ? e.message : String(
* 注册经 git CLI 补齐的操作(M5' batch 1):cherry-pick / revert / reset / branch rename /
* ignore / compare branches / reword。均经 `service.execGit`(复用 vscode.git 的同一 git 二进制)。
*/
export function registerGitCliCommands(service: GitRepositoryService, branchesTree: BranchesTreeProvider, logTree: LogTreeProvider): vscode.Disposable[] {
export function registerGitCliCommands(service: GitRepositoryService, branchesTree: BranchesTreeProvider, logTree: LogFilterControl): vscode.Disposable[] {
const subs: vscode.Disposable[] = [];

subs.push(
Expand Down
4 changes: 2 additions & 2 deletions src/adapter/history-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { BranchNode } from './tree/branches-tree';
import type { BranchesTreeProvider } from './tree/branches-tree';
import type { BranchFavorites } from './branch-favorites';
import type { ChangeItem, GitRepositoryService } from './git-repository-service';
import type { LogNode, LogTreeProvider } from './tree/log-tree';
import type { LogFilterControl, LogNode } from './webview/log-webview';
import { handleGitConflict } from './conflict-ui';
import type { MergeMode } from '../engine/log/log-filter';
import { selectedBranchRefs } from './branch-selection';
Expand All @@ -13,7 +13,7 @@ import { formatBranchDeleteConfirm, partitionByMerged, truncateNames } from '../
/** 注册 Log/Branches/Blame/History/Tags 相关命令。 */
export function registerHistoryCommands(
service: GitRepositoryService,
logTree: LogTreeProvider,
logTree: LogFilterControl,
branchesTree: BranchesTreeProvider,
favorites: BranchFavorites,
): vscode.Disposable[] {
Expand Down
4 changes: 2 additions & 2 deletions src/adapter/misc-commands.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as fs from 'fs';
import * as vscode from 'vscode';
import type { GitRepositoryService } from './git-repository-service';
import type { LogTreeProvider } from './tree/log-tree';
import type { LogFilterControl } from './webview/log-webview';
import type { BranchesTreeProvider } from './tree/branches-tree';
import { handleGitConflict } from './conflict-ui';

Expand All @@ -17,7 +17,7 @@ const errMsg = (e: unknown): string => (e instanceof Error ? e.message : String(
export function registerMiscCommands(
service: GitRepositoryService,
branchesTree: BranchesTreeProvider,
logTree: LogTreeProvider,
logTree: LogFilterControl,
): vscode.Disposable[] {
const subs: vscode.Disposable[] = [];

Expand Down
4 changes: 2 additions & 2 deletions src/adapter/remote-commands.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as vscode from 'vscode';
import type { GitRepositoryService } from './git-repository-service';
import type { BranchesTreeProvider } from './tree/branches-tree';
import type { LogTreeProvider } from './tree/log-tree';
import type { LogFilterControl } from './webview/log-webview';
import { handleGitConflict } from './conflict-ui';

const errMsg = (e: unknown): string => (e instanceof Error ? e.message : String(e));
Expand All @@ -17,7 +17,7 @@ const errMsg = (e: unknown): string => (e instanceof Error ? e.message : String(
export function registerRemoteCommands(
service: GitRepositoryService,
branchesTree: BranchesTreeProvider,
logTree: LogTreeProvider,
logTree: LogFilterControl,
): vscode.Disposable[] {
const subs: vscode.Disposable[] = [];

Expand Down
165 changes: 0 additions & 165 deletions src/adapter/tree/log-tree.ts

This file was deleted.

Loading
Loading