From b9a8e10b6effaf05bf3f4c832e486c682f91ea8a Mon Sep 17 00:00:00 2001 From: xueqiang Date: Fri, 16 Oct 2026 14:07:26 +0800 Subject: [PATCH] Fix workspace file list not refreshed when git status is empty --- src/components/WorkspaceFiles.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/WorkspaceFiles.vue b/src/components/WorkspaceFiles.vue index 5b06e1b..7cb5c0e 100644 --- a/src/components/WorkspaceFiles.vue +++ b/src/components/WorkspaceFiles.vue @@ -258,9 +258,9 @@ export default defineComponent({ async refresh() { // --untracked-files=all - Also shows individual files in untracked directories const data = await git_async([ 'status', '--porcelain', '--untracked-files=all' ]); - if (data) { - this.parseStatus(data); - } + // An empty result means a clean working tree (e.g. right after a commit or revert): + // it must still be applied, otherwise the list keeps stale entries. + this.parseStatus(data || ''); }, }, })