Skip to content

Commit 64d66f7

Browse files
committed
worktree: remove special case GVFS cmd blocking
Replace the special casing of the `worktree` command being blocked on VFS-enabled repos with the new `BLOCK_ON_VFS_ENABLED` flag. Signed-off-by: Matthew John Cheetham <[email protected]>
1 parent 60d2d7a commit 64d66f7

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

builtin/worktree.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,13 +1430,6 @@ int cmd_worktree(int ac,
14301430

14311431
git_config(git_worktree_config, NULL);
14321432

1433-
/*
1434-
* git-worktree is special-cased to work in Scalar repositories
1435-
* even when they use the GVFS Protocol.
1436-
*/
1437-
if (core_gvfs & GVFS_USE_VIRTUAL_FILESYSTEM)
1438-
die("'git %s' is not supported on a GVFS repo", "worktree");
1439-
14401433
if (!prefix)
14411434
prefix = "";
14421435

git.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ static struct cmd_struct commands[] = {
724724
{ "verify-tag", cmd_verify_tag, RUN_SETUP },
725725
{ "version", cmd_version },
726726
{ "whatchanged", cmd_whatchanged, RUN_SETUP },
727-
{ "worktree", cmd_worktree, RUN_SETUP },
727+
{ "worktree", cmd_worktree, RUN_SETUP | BLOCK_ON_VFS_ENABLED },
728728
{ "write-tree", cmd_write_tree, RUN_SETUP },
729729
};
730730

0 commit comments

Comments
 (0)