Skip to content

Commit f0357cf

Browse files
mjcheethamdscho
authored andcommitted
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 4b136a4 commit f0357cf

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
@@ -1451,13 +1451,6 @@ int cmd_worktree(int ac,
14511451

14521452
git_config(git_worktree_config, NULL);
14531453

1454-
/*
1455-
* git-worktree is special-cased to work in Scalar repositories
1456-
* even when they use the GVFS Protocol.
1457-
*/
1458-
if (core_gvfs & GVFS_USE_VIRTUAL_FILESYSTEM)
1459-
die("'git %s' is not supported on a GVFS repo", "worktree");
1460-
14611454
if (!prefix)
14621455
prefix = "";
14631456

git.c

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

0 commit comments

Comments
 (0)