Use new semantics of is_bare/inside_git_dir/inside_work_tree

Up to now to check for a working tree this was used:
	!is_bare && !inside_git_dir
(the check for bare is redundant because is_inside_git_dir
returned already 1 for bare repositories).
Now the check is:
	inside_work_tree && !inside_git_dir

Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Matthias Lederhofer
2007-06-03 16:48:16 +02:00
committed by Junio C Hamano
parent 892c41b98a
commit 7ae3df8c0a
5 changed files with 14 additions and 14 deletions

View File

@ -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);