Skip to content

Commit 7f0fc0c

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 <mjcheetham@outlook.com>
1 parent 398e89b commit 7f0fc0c

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
@@ -727,7 +727,7 @@ static struct cmd_struct commands[] = {
727727
{ "verify-tag", cmd_verify_tag, RUN_SETUP },
728728
{ "version", cmd_version },
729729
{ "whatchanged", cmd_whatchanged, RUN_SETUP },
730-
{ "worktree", cmd_worktree, RUN_SETUP },
730+
{ "worktree", cmd_worktree, RUN_SETUP | BLOCK_ON_VFS_ENABLED },
731731
{ "write-tree", cmd_write_tree, RUN_SETUP },
732732
};
733733

0 commit comments

Comments
 (0)