Merge branch 'ei/worktree+filter'
* ei/worktree+filter: filter-branch: always export GIT_DIR if it is set setup_git_directory: fix segfault if repository is found in cwd test GIT_WORK_TREE extend rev-parse test for --is-inside-work-tree Use new semantics of is_bare/inside_git_dir/inside_work_tree introduce GIT_WORK_TREE to specify the work tree test git rev-parse rev-parse: introduce --is-bare-repository rev-parse: document --is-inside-git-dir
This commit is contained in:
@ -470,7 +470,7 @@ int cmd_ls_files(int argc, const char **argv, const char *prefix)
|
||||
}
|
||||
|
||||
if (require_work_tree &&
|
||||
(is_bare_repository() || is_inside_git_dir()))
|
||||
(!is_inside_work_tree() || is_inside_git_dir()))
|
||||
die("This operation must be run in a work tree");
|
||||
|
||||
pathspec = get_pathspec(prefix, argv + i);
|
||||
|
||||
Reference in New Issue
Block a user