Commit 778fea4
committed
worktree remove: use gvfs_config_is_set for skip-clean-check gate
The skip-clean-check guard in remove_worktree() was gated on
core_virtualfilesystem, which is only initialized by
repo_config_get_virtualfilesystem() during index loading. Since the
worktree remove path never loads the index before this check, the
variable was always NULL, causing check_clean_worktree() to run even
when VFSForGit had already unmounted the projection and written the
skip-clean-check marker file. This made 'git worktree remove' fail
with 'fatal: failed to run git status' in GVFS repos.
Replace core_virtualfilesystem with gvfs_config_is_set(GVFS_USE_VIRTUAL_FILESYSTEM),
which is already loaded from core.gvfs by cmd_worktree() before
dispatch to remove_worktree().
Assisted-by: Claude Opus 4.6
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>1 parent b5f9211 commit 778fea4
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1420 | 1420 | | |
1421 | 1421 | | |
1422 | 1422 | | |
1423 | | - | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
1424 | 1426 | | |
1425 | 1427 | | |
1426 | 1428 | | |
| |||
0 commit comments