From 3cdd271143d9bdadf47a9619c1afee736e0fb30e Mon Sep 17 00:00:00 2001 From: Emmanuel Lobo <76094069+UnschooledGamer@users.noreply.github.com> Date: Fri, 26 Jun 2026 01:19:29 +0530 Subject: [PATCH 1/5] feat: implement commit history feature with detailed view and resource management (#38) --- src/git/commands.ts | 110 ++++++++++++++++++++++++++++++++++++++- src/git/commitDetails.ts | 47 +++++++++++++++++ src/git/repository.ts | 56 +++++++++++++++++++- src/main.ts | 6 +++ src/scm/scmView.ts | 90 ++++++++++++++++++++++++++++++-- src/scm/style.scss | 71 +++++++++++++++++++++++-- 6 files changed, 371 insertions(+), 9 deletions(-) create mode 100644 src/git/commitDetails.ts diff --git a/src/git/commands.ts b/src/git/commands.ts index 7398ae2..3eb390a 100644 --- a/src/git/commands.ts +++ b/src/git/commands.ts @@ -3,7 +3,7 @@ import { Disposable, IDisposable } from "../base/disposable"; import { toFileUrl, uriToPath } from "../base/uri"; import { SourceControl, SourceControlResourceState } from "../scm/api/sourceControl"; import { ApiRepository } from "./api/api1"; -import { Branch, CommitOptions, ForcePushMode, GitErrorCodes, Ref, RefType, Remote, RemoteSourcePublisher, Status } from "./api/git"; +import { Branch, Commit, CommitOptions, ForcePushMode, GitErrorCodes, Ref, RefType, Remote, RemoteSourcePublisher, Status } from "./api/git"; import { item, showDialogMessage } from "./dialog"; import { UnifiedDiff } from "./diff"; import { Git, GitError, Stash, Worktree } from "./git"; @@ -11,6 +11,7 @@ import { getInputHintResult, HintItem, InputHint, showInputHints } from "./hints import { LogOutputChannel } from "./logger"; import { Model } from "./model"; import { Repository, Resource, ResourceGroupType } from "./repository"; +import { formatCommitDetails } from "./commitDetails"; import { toGitUri } from "./uri"; import { coalesce, fromNow, getModeForFile, grep, isDescendant, pathEquals, toFullPath } from "./utils"; @@ -342,6 +343,38 @@ class RepositoryItem implements HintItem { constructor(public readonly path: string) { } } +class CommitHistoryItem implements HintItem { + + get label(): string { + return this.subject || this.shortHash; + } + + get icon(): string { + return 'vscode-codicons_git_commit'; + } + + get description(): string { + return `${this.shortHash} • ${this.commit.commitDate ? fromNow(this.commit.commitDate, true, true) : 'No Date'}`; + } + + get detail(): string | undefined { + return this.commit.authorName; + } + + get shortHash(): string { + return this.commit.hash.substring(0, this.shortCommitLength); + } + + private get subject(): string { + return this.commit.message.split(/\r?\n/)[0]?.trim() || ''; + } + + constructor( + readonly commit: Commit, + private readonly shortCommitLength: number + ) { } +} + class StashItem implements HintItem { get label(): string { return `#${this.stash.index}: ${this.stash.description}`; } @@ -368,6 +401,21 @@ function sanitizeRemoteName(name: string) { return name && name.replace(/^\.|\/\.|\.\.|~|\^|:|\/$|\.lock$|\.lock\/|\\|\*|\s|^\s*$|\.$|\[|\]$/g, '-'); } +async function copyText(value: string): Promise { + if (navigator.clipboard?.writeText) { + await navigator.clipboard.writeText(value); + return; + } + + const textarea = tag('textarea', { value }); + textarea.style.position = 'fixed'; + textarea.style.opacity = '0'; + document.body.appendChild(textarea); + textarea.select(); + document.execCommand('copy'); + textarea.remove(); +} + enum PushType { Push, PushTo, @@ -685,6 +733,66 @@ export class CommandCenter { await repository.refresh(); } + @command('Show Commit', { repository: true }) + async showCommit(repository: Repository | null, commit: Commit): Promise { + + if(!commit && repository) { + const gitConfig = config.get('vcgit')!; + const shortCommitLength = gitConfig.commitShortHashLength; + const commits = await repository.log({ maxEntries: 100, shortStats: true, silent: true }); + + if (commits.length === 0) { + window.toast('No commit history found', 2000); + return; + } + + const commitItem = await showInputHints( + commits.map(commit => new CommitHistoryItem(commit, shortCommitLength)), + { placeholder: 'Select a commit to view' } + ); + + if (!commitItem) { + return; + } + + commit = commitItem.commit; + } + + const box = DialogBox('Commit Details', formatCommitDetails(commit), 'OK', ''); + box.ok(() => box.hide()); + } + + @command('History', { repository: true }) + async history(repository: Repository): Promise { + const gitConfig = config.get('vcgit')!; + const shortCommitLength = gitConfig.commitShortHashLength; + const commits = await repository.log({ maxEntries: 100, shortStats: true, silent: true }); + + if (commits.length === 0) { + window.toast('No commit history found', 3000); + return; + } + + const commitItem = await showInputHints( + commits.map(commit => new CommitHistoryItem(commit, shortCommitLength)), + { placeholder: 'Select a commit to view' } + ); + + if (!commitItem) { + return; + } + + const showDetails = 'Show Details'; + const copyHash = 'Copy Hash'; + const action = await select('', [showDetails, copyHash]); + + if (action === showDetails) { + await this.showCommit(null, commitItem.commit); + } else if (action === copyHash) { + await copyText(commitItem.commit.hash); + window.toast('Commit hash copied', 3000); + } + } @command('Open Repository', { repository: false }) async openRepository(path?: string): Promise { if (!path) { diff --git a/src/git/commitDetails.ts b/src/git/commitDetails.ts new file mode 100644 index 0000000..581a457 --- /dev/null +++ b/src/git/commitDetails.ts @@ -0,0 +1,47 @@ +interface CommitLike { + readonly hash: string; + readonly message: string; + readonly parents: readonly string[]; + readonly authorName?: string; + readonly authorEmail?: string; + readonly commitDate?: Date; + readonly refNames?: readonly string[]; + readonly shortStat?: { + readonly files: number; + readonly insertions: number; + readonly deletions: number; + }; +} + +function escapeHtml(value: string): string { + return value.replace(/[&<>"']/g, char => { + switch (char) { + case '&': return '&'; + case '<': return '<'; + case '>': return '>'; + case '"': return '"'; + case "'": return '''; + default: return char; + } + }); +} + +export function formatCommitDetails(commit: CommitLike): string { + const shortStat = commit.shortStat + ? `${commit.shortStat.files} files changed, ${commit.shortStat.insertions} insertions(+), ${commit.shortStat.deletions} deletions(-)` + : 'No file change statistics available'; + const parents = commit.parents.length > 0 ? commit.parents.join(', ') : 'None'; + const refs = commit.refNames?.filter(Boolean).join(', ') || 'None'; + const commitAuthor = commit.authorName ? `${commit.authorName} <${commit.authorEmail}>` : 'Unknown Author'; + const commitDate = commit.commitDate ? commit.commitDate.toLocaleString() : 'Unknown Date'; + + return [ + `Commit
${escapeHtml(commit.hash)}`, + `Author
${escapeHtml(commitAuthor)}`, + `Date
${escapeHtml(commitDate)}`, + `Parents
${escapeHtml(parents)}`, + `Refs
${escapeHtml(refs)}`, + `Stats
${escapeHtml(shortStat)}`, + `Message
${escapeHtml(commit.message)}
` + ].join('

'); +} \ No newline at end of file diff --git a/src/git/repository.ts b/src/git/repository.ts index 6207610..e06aad7 100644 --- a/src/git/repository.ts +++ b/src/git/repository.ts @@ -348,6 +348,35 @@ class ResourceCommandResolver { } } +class CommitResource implements SourceControlResourceState { + readonly contextValue = 'commit'; + readonly decorations: SourceControlResourceDecorations = { icon: 'vscode-codicons_git_commit' }; + readonly resourceUri: string; + readonly command: SourceControlCommandAction; + + constructor( + readonly commit: Commit, + index: number, + shortCommitLength: number + ) { + this.resourceUri = toCommitResourceUri(commit, index, shortCommitLength); + this.command = { id: 'git.showCommit', title: 'Show Commit', arguments: [commit] }; + } +} + +function toCommitResourceUri(commit: Commit, index: number, shortCommitLength: number): string { + const subject = commit.message.split(/\r?\n/)[0]?.trim() || commit.hash; + const params = new URLSearchParams({ + hash: commit.hash, + shortHash: commit.hash.substring(0, shortCommitLength), + subject, + author: commit.authorName || '', + date: commit.commitDate ? commit.commitDate.toISOString() : '' + }); + + return `git-commit://${index.toString().padStart(5, '0')}/${commit.hash}?${params.toString()}`; +} + interface ModifiedOrOriginal { modified?: string | undefined; original?: string | undefined; @@ -357,6 +386,10 @@ export interface GitResourceGroup extends SourceControlResourceGroup { resourceStates: Resource[]; } +interface GitCommitResourceGroup extends SourceControlResourceGroup { + resourceStates: CommitResource[]; +} + interface GitResourceGroups { indexGroup?: Resource[]; mergeGroup?: Resource[]; @@ -540,6 +573,11 @@ export class Repository implements IDisposable { return this._untrackedGroup as GitResourceGroup; } + private _commitsGroup: SourceControlResourceGroup; + get commitsGroup(): GitCommitResourceGroup { + return this._commitsGroup as GitCommitResourceGroup; + } + private _EMPTY_TREE: string | undefined; private _HEAD: Branch | undefined; @@ -623,6 +661,7 @@ export class Repository implements IDisposable { this._indexGroup.resourceStates = []; this._workingTreeGroup.resourceStates = []; this._untrackedGroup.resourceStates = []; + this._commitsGroup.resourceStates = []; this._sourceControl.count = 0; } @@ -702,6 +741,7 @@ export class Repository implements IDisposable { this._indexGroup = this._sourceControl.createResourceGroup('index', 'Staged Changes'); this._workingTreeGroup = this._sourceControl.createResourceGroup('workingTree', 'Changes'); this._untrackedGroup = this._sourceControl.createResourceGroup('untracked', 'Untracked Changes'); + this._commitsGroup = this._sourceControl.createResourceGroup('commits', 'Commits'); const updateIndexGroupVisibility = () => { const gitConfig = config.get('vcgit')!; @@ -728,11 +768,13 @@ export class Repository implements IDisposable { this.mergeGroup.hideWhenEmpty = true; this.untrackedGroup.hideWhenEmpty = true; + this.commitsGroup.hideWhenEmpty = true; this.disposables.push(this._mergeGroup); this.disposables.push(this._indexGroup); this.disposables.push(this._workingTreeGroup); this.disposables.push(this._untrackedGroup); + this.disposables.push(this._commitsGroup); this.disposables.push(new AutoFetcher(this)); @@ -1677,11 +1719,12 @@ export class Repository implements IDisposable { this._updateResourceGroupsState(optimisticResourcesGroups); } - const [HEAD, remotes, submodules, worktrees, rebaseCommit, mergeInProgress] = await Promise.all([ + const [HEAD, remotes, submodules, worktrees, commits, rebaseCommit, mergeInProgress] = await Promise.all([ this.repository.getHEADRef(), this.repository.getRemotes(), this.repository.getSubmodules(), this.repository.getWorktrees(), + this.getRecentCommits(), this.getRebaseCommit(), this.isMergeInProgress() ]); @@ -1690,6 +1733,9 @@ export class Repository implements IDisposable { this._remotes = remotes; this._submodules = submodules; this._worktrees = worktrees!; + const gitConfig = config.get('vcgit')!; + const shortCommitLength = gitConfig.commitShortHashLength ?? 7; + this.commitsGroup.resourceStates = commits.map((commit, index) => new CommitResource(commit, index, shortCommitLength)); this.rebaseCommit = rebaseCommit; this.mergeInProgress = mergeInProgress; @@ -1713,6 +1759,14 @@ export class Repository implements IDisposable { } } + private async getRecentCommits(): Promise { + try { + return await this.repository.log({ maxEntries: 100, shortStats: true }); + } catch (err: any) { + this.logger.warn(`[Repository][getRecentCommits] Unable to read commit history: ${err.message || err}`); + return []; + } + } private async getStatus(): Promise { const gitConfig = config.get('vcgit')!; const untrackedChanges = gitConfig.untrackedChanges; diff --git a/src/main.ts b/src/main.ts index dc0bda8..1554c50 100644 --- a/src/main.ts +++ b/src/main.ts @@ -507,6 +507,12 @@ function initializeMenus(logger: LogOutputChannel): void { submenu: true, when: (ctx: SCMMenuContext) => ctx.scmProvider === 'git' }, + { + command: { id: 'git.history', title: 'History' }, + group: '2_main@8', + when: (ctx: SCMMenuContext) => ctx.scmProvider === 'git', + enablement: () => !App.getContext('git.operationInProgress') + }, { command: { id: 'git.showOutput', title: 'Show Git Output' }, group: '3_footer@1', diff --git a/src/scm/scmView.ts b/src/scm/scmView.ts index c8e297f..f98f224 100644 --- a/src/scm/scmView.ts +++ b/src/scm/scmView.ts @@ -3,6 +3,7 @@ import { decorationService } from "../base/decorationService"; import { Disposable, DisposableMap, DisposableStore, IDisposable } from "../base/disposable"; import { Emitter, Event } from "../base/event"; import { CollapsableList, IListContextMenuEvent, IListDelegate, IListMouseEvent, IListRenderer } from "../base/list"; +import { fromNow } from "../git/utils"; import { SCMMenuItemAction } from "./menus"; import { IResourceNode, ResourceTree } from "./resourceTree"; import { RepositoryRenderer } from "./scmRepositoryRenderer"; @@ -209,6 +210,31 @@ class ResourceGroupRenderer implements IListRenderer, index: number, templateData: ResourceTemplate): void { const isNode = ResourceTree.isResourceNode(resourceOrFolder); const uri = isNode ? resourceOrFolder.uri : resourceOrFolder.sourceUri; + const commitInfo = !isNode && resourceOrFolder.contextValue === 'commit' ? parseCommitResourceUri(uri) : undefined; const fileName = isNode ? resourceOrFolder.name : (uri.split('/').pop() || uri); let depth = 0; @@ -259,14 +286,56 @@ class ResourceRenderer implements IListRenderer, index: number, template: ResourceTemplate): void { @@ -307,6 +376,8 @@ class ListDelegate implements IListDelegate { return ActionButtonRenderer.DEFAULT_HEIGHT + 8; } else if (isSCMSeparator(element)) { return 5; + } else if (isSCMResource(element) && element.contextValue === 'commit') { + return 48; } else { return 34; } @@ -439,6 +510,7 @@ export class SCMView extends Disposable.Disposable implements IView { private inputRenderer!: InputRenderer; private actionButtonRenderer!: ActionButtonRenderer; private collapsedResourceGroups = new Set(); + private initializedDefaultCollapsedResourceGroups = new WeakSet(); private expandedNodes = new Set>(); private repositoryStates = new Map(); @@ -557,6 +629,17 @@ export class SCMView extends Disposable.Disposable implements IView { })); } + private initializeResourceGroupCollapseState(group: ISCMResourceGroup): void { + if (this.initializedDefaultCollapsedResourceGroups.has(group)) { + return; + } + + if (group.id === 'commits') { + this.collapsedResourceGroups.add(group); + } + + this.initializedDefaultCollapsedResourceGroups.add(group); + } private toggleResourceGroup(group: ISCMResourceGroup): void { if (this.collapsedResourceGroups.has(group)) { this.collapsedResourceGroups.delete(group); @@ -630,6 +713,7 @@ export class SCMView extends Disposable.Disposable implements IView { } for (const group of resourceGroups) { + this.initializeResourceGroupCollapseState(group); if (group.resources.length === 0 && group.hideWhenEmpty) { continue; } diff --git a/src/scm/style.scss b/src/scm/style.scss index 16d6788..974ec0f 100644 --- a/src/scm/style.scss +++ b/src/scm/style.scss @@ -338,10 +338,8 @@ } &.resource { - > .text { - &.strike-through { - text-decoration: line-through; - } + > .text.strike-through { + text-decoration: line-through; } > .letter { @@ -352,6 +350,71 @@ justify-content: center; align-items: center; } + + &.commit-resource { + display: grid; + grid-template-columns: 30px minmax(0, 1fr); + grid-template-rows: 22px 18px; + align-content: center; + box-sizing: border-box; + padding-right: 6px; + + > .icon { + grid-column: 1; + grid-row: 1 / 3; + align-self: start; + margin-top: 5px; + color: var(--link-text-color); + } + + > .text { + grid-column: 2; + grid-row: 1; + min-width: 0; + overflow: hidden; + color: var(--primary-text-color); + font-size: 0.62rem; + line-height: 22px; + text-overflow: ellipsis; + white-space: nowrap; + } + + > .commit-meta { + grid-column: 2; + grid-row: 2; + display: flex; + align-items: center; + gap: 6px; + min-width: 0; + overflow: hidden; + color: var(--primary-text-color); + font-family: monospace; + font-size: 0.56rem; + line-height: 18px; + opacity: 0.7; + white-space: nowrap; + + > .hash { + flex-shrink: 0; + color: var(--link-text-color); + } + + > .author { + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + } + + > .time { + flex-shrink: 0; + margin-left: auto; + } + } + + > .letter { + display: none; + } + } } &.scm-input { From 847b65a0c32ef74633bf9c6085444d462d16854a Mon Sep 17 00:00:00 2001 From: dikidjatar Date: Fri, 26 Jun 2026 04:16:15 +0700 Subject: [PATCH 2/5] chore: release v2.7.0 --- changelogs.md | 4 ++++ package.json | 2 +- plugin.json | 16 ++++++++++++++-- readme.md | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/changelogs.md b/changelogs.md index 6b0c2cf..98fb217 100644 --- a/changelogs.md +++ b/changelogs.md @@ -1,5 +1,9 @@ # ChangeLog +## [2.7.0] - 2026-26-06 + +- Added commit history feature with detailed commit view and resource management by [@UnschooledGamer](https://github.com/UnschooledGamer) + ## [2.6.1] - 2026-21-06 - Add 'add to .gitignore' scm menu for CodeMirror diff --git a/package.json b/package.json index f559457..fa247e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "acode.plugin.version.control.gitpro", - "version": "2.6.1", + "version": "2.7.0", "description": "Plugin for Acode to provide Git SCM features", "main": "dist/main.js", "repository": "https://github.com/dikidjatar/acode-plugin-version-control-gitpro", diff --git a/plugin.json b/plugin.json index b225dc9..1e9472a 100644 --- a/plugin.json +++ b/plugin.json @@ -3,7 +3,7 @@ "id": "acode.plugin.version.control.gitpro", "name": "Git SCM", "main": "main.js", - "version": "2.6.1", + "version": "2.7.0", "repository": "https://github.com/dikidjatar/acode-plugin-version-control-gitpro.git", "icon": "icon.png", "files": [ @@ -32,5 +32,17 @@ "name": "Diki Djatar", "email": "dikidjatar@gmail.com", "github": "dikidjatar" - } + }, + "contributors": [ + { + "name": "UnschooledGamer", + "github": "UnschooledGamer", + "role": "contributor" + }, + { + "name": "Victor Elijha", + "github": "Victozee26", + "role": "contributor" + } + ] } diff --git a/readme.md b/readme.md index c7a7b10..8cbc0f2 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ # Acode Plugin Git SCM -![Version](https://img.shields.io/badge/version-2.6.1-blue.svg) +![Version](https://img.shields.io/badge/version-2.7.0-blue.svg) ![License](https://img.shields.io/badge/license-MIT-green.svg) ![Acode](https://img.shields.io/badge/Acode-Compatible-orange.svg) From 7ce095e7b6c8ac9c33c5495d364631693f6ff12e Mon Sep 17 00:00:00 2001 From: Diki Djatar <97192796+dikidjatar@users.noreply.github.com> Date: Fri, 26 Jun 2026 16:44:54 +0700 Subject: [PATCH 3/5] feat: source control history setting (#39) * feat: add setting for commit history resource group * fix(executor): filter out output error --- src/base/executor.ts | 15 +++++++++------ src/git/repository.ts | 12 +++++++++--- src/main.ts | 9 ++++++++- typings/typing.d.ts | 1 + 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/src/base/executor.ts b/src/base/executor.ts index 8f41e43..8a1ad0f 100644 --- a/src/base/executor.ts +++ b/src/base/executor.ts @@ -135,12 +135,15 @@ export function getExecutor(): Executor { return Executor; } -function getExecutorType(): 'BackgroundExecutor' | 'Executor' { - if (typeof Executor.BackgroundExecutor !== 'undefined') { - return 'BackgroundExecutor'; +function filterOutput(type: ExecutorOutputType, data: string): boolean { + if (type !== 'stderr') { + return false; } - return 'Executor'; + return ( + /proot warning: can't sanitize binding/.test(data) || + /find: .: Permission denied/.test(data) + ); } class AcodeProcess implements Process { @@ -206,9 +209,9 @@ class AcodeProcess implements Process { this._pid = await getExecutor().start( command, - (type: string, data: string) => { + (type: ExecutorOutputType, data: string) => { // Filter out proot warnings - if (type === 'stderr' && data.includes("proot warning: can't sanitize binding")) { + if (filterOutput(type, data)) { return; } diff --git a/src/git/repository.ts b/src/git/repository.ts index e06aad7..2d353bc 100644 --- a/src/git/repository.ts +++ b/src/git/repository.ts @@ -755,7 +755,8 @@ export class Repository implements IDisposable { Event.filter(config.onDidChangeConfiguration, (e) => e.affectsConfiguration('vcgit.untrackedChanges') || e.affectsConfiguration('vcgit.ignoreSubmodules') || - e.affectsConfiguration('vcgit.similarityThreshold') + e.affectsConfiguration('vcgit.similarityThreshold') || + e.affectsConfiguration('vcgit.showCommitHistoryResourceGroup') )(() => this.updateModelState(), this, this.disposables); const updateInputBoxVisibility = () => { @@ -1735,7 +1736,7 @@ export class Repository implements IDisposable { this._worktrees = worktrees!; const gitConfig = config.get('vcgit')!; const shortCommitLength = gitConfig.commitShortHashLength ?? 7; - this.commitsGroup.resourceStates = commits.map((commit, index) => new CommitResource(commit, index, shortCommitLength)); + this.commitsGroup.resourceStates = commits?.map((commit, index) => new CommitResource(commit, index, shortCommitLength)) ?? []; this.rebaseCommit = rebaseCommit; this.mergeInProgress = mergeInProgress; @@ -1759,8 +1760,13 @@ export class Repository implements IDisposable { } } - private async getRecentCommits(): Promise { + private async getRecentCommits(): Promise { try { + const gitConfig = config.get('vcgit'); + const showCommitHistoryResourceGroup = gitConfig?.showCommitHistoryResourceGroup == true; + if (!showCommitHistoryResourceGroup) { + return undefined; + } return await this.repository.log({ maxEntries: 100, shortStats: true }); } catch (err: any) { this.logger.warn(`[Repository][getRecentCommits] Unable to read commit history: ${err.message || err}`); diff --git a/src/main.ts b/src/main.ts index 1554c50..c030b1a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -91,7 +91,8 @@ const defaultGitConfig: IGitConfig = { refreshOnSaveFile: false, optimisticUpdate: true, detectWorktrees: false, - detectWorktreesLimit: 20 + detectWorktreesLimit: 20, + showCommitHistoryResourceGroup: true } async function destroy() { @@ -1396,6 +1397,12 @@ function gitPluginSettings(): Acode.PluginSettings { info: 'Controls the limit of Git worktrees detected.', prompt: 'Detect Worktrees Limit', promptType: 'number' + }, + { + key: 'showCommitHistoryResourceGroup', + checkbox: configs.showCommitHistoryResourceGroup, + text: 'Git: Show Commit History Resource Group', + info: 'Show the Commit History resource group.', } ], cb(key: string, value: unknown) { diff --git a/typings/typing.d.ts b/typings/typing.d.ts index 8d33e50..b0f0fba 100644 --- a/typings/typing.d.ts +++ b/typings/typing.d.ts @@ -72,6 +72,7 @@ interface IGitConfig { readonly optimisticUpdate: boolean; readonly detectWorktrees: boolean; readonly detectWorktreesLimit: number; + readonly showCommitHistoryResourceGroup: boolean; } declare namespace Acode { From 2d152a5fb834b34e760b585fde54e9994cf8afdf Mon Sep 17 00:00:00 2001 From: dikidjatar Date: Fri, 26 Jun 2026 16:59:15 +0700 Subject: [PATCH 4/5] chore: release v2.6.1 --- changelogs.md | 5 +++++ package.json | 2 +- plugin.json | 2 +- readme.md | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/changelogs.md b/changelogs.md index 98fb217..2cec84d 100644 --- a/changelogs.md +++ b/changelogs.md @@ -1,5 +1,10 @@ # ChangeLog +## [2.7.1] - 2026-26-06 + +- Added new setting: `showCommitHistoryResourceGroup` default=true +- Fixed errors like: `find: .: Permission denied` + ## [2.7.0] - 2026-26-06 - Added commit history feature with detailed commit view and resource management by [@UnschooledGamer](https://github.com/UnschooledGamer) diff --git a/package.json b/package.json index fa247e5..d1e475e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "acode.plugin.version.control.gitpro", - "version": "2.7.0", + "version": "2.7.1", "description": "Plugin for Acode to provide Git SCM features", "main": "dist/main.js", "repository": "https://github.com/dikidjatar/acode-plugin-version-control-gitpro", diff --git a/plugin.json b/plugin.json index 1e9472a..d4e4fe8 100644 --- a/plugin.json +++ b/plugin.json @@ -3,7 +3,7 @@ "id": "acode.plugin.version.control.gitpro", "name": "Git SCM", "main": "main.js", - "version": "2.7.0", + "version": "2.7.1", "repository": "https://github.com/dikidjatar/acode-plugin-version-control-gitpro.git", "icon": "icon.png", "files": [ diff --git a/readme.md b/readme.md index 8cbc0f2..6352c2b 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ # Acode Plugin Git SCM -![Version](https://img.shields.io/badge/version-2.7.0-blue.svg) +![Version](https://img.shields.io/badge/version-2.7.1-blue.svg) ![License](https://img.shields.io/badge/license-MIT-green.svg) ![Acode](https://img.shields.io/badge/Acode-Compatible-orange.svg) From 266c04ef3406f9a2d7cf073d9c2c4bf05ee134cc Mon Sep 17 00:00:00 2001 From: dikidjatar Date: Fri, 26 Jun 2026 17:14:25 +0700 Subject: [PATCH 5/5] Update DOCS --- DOCS.md | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/DOCS.md b/DOCS.md index 494155d..94d4b02 100644 --- a/DOCS.md +++ b/DOCS.md @@ -17,20 +17,10 @@ apk add git #### 2. Install Plugin 1. Open Acode → Settings → Plugins -2. Search "Git SCM" or "Version Control GitPro" +2. Search "Git SCM" 3. Install plugin 4. Restart -#### 4. Optional: Install inotify-tools - -For automatic file change detection: - -```bash -apk add inotify-tools -``` - -Enable in plugin settings `GIt: Use inotifywait` and restart - ## Getting Started ### Opening a Git Repository @@ -187,13 +177,13 @@ const scm = acode.require('scm'); ```javascript const sourceControl = scm.createSourceControl( - 'my-scm-id', // Unique ID - 'My SCM Label' // Display label, - '/public' // Root URI + 'my-scm-id', + 'My SCM Label', + '/public' ); // Set icon -sourceControl.icon = 'git-branch'; +sourceControl.icon = 'scm'; // Set root URI sourceControl.rootUri = '/path/to/repo'; @@ -222,19 +212,15 @@ changes.resourceStates = [ { resourceUri: '/path/to/file1.js', decorations: { - letter: 'M', - color: '#ffa500', strikeThrough: false, - icon: 'modified' + icon: 'file' + }, + command: { + id: 'my.command', + title: 'My Command', + arguments: ['arg1'] } }, - { - resourceUri: '/path/to/file2.js', - decorations: { - letter: 'A', - color: '#00ff00' - } - } ]; ```