Skip to content

Commit aa42f6d

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 539650e commit aa42f6d

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

‎builtin/worktree.c‎

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

14651465
repo_config(the_repository, git_worktree_config, NULL);
14661466

1467-
/*
1468-
* git-worktree is special-cased to work in Scalar repositories
1469-
* even when they use the GVFS Protocol.
1470-
*/
1471-
if (gvfs_config_is_set(repo, GVFS_USE_VIRTUAL_FILESYSTEM))
1472-
die("'git %s' is not supported on a GVFS repo", "worktree");
1473-
14741467
if (!prefix)
14751468
prefix = "";
14761469

‎git.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ static struct cmd_struct commands[] = {
756756
#ifndef WITH_BREAKING_CHANGES
757757
{ "whatchanged", cmd_whatchanged, RUN_SETUP | DEPRECATED },
758758
#endif
759-
{ "worktree", cmd_worktree, RUN_SETUP | BLOCK_ON_GVFS_REPO },
759+
{ "worktree", cmd_worktree, RUN_SETUP | BLOCK_ON_VFS_ENABLED },
760760
{ "write-tree", cmd_write_tree, RUN_SETUP },
761761
};
762762

0 commit comments

Comments
 (0)