summaryrefslogtreecommitdiff
path: root/builtin-ls-files.c
diff options
context:
space:
mode:
authorMatthias Lederhofer <matled@gmx.net>2007-06-03 14:48:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-06-06 23:07:53 (GMT)
commit7ae3df8c0aa3b7337ae9ac7b6184ac05985bf996 (patch)
tree7a0a38202a5dec2f1e509f624eb86b5979f63e84 /builtin-ls-files.c
parent892c41b98ae2e6baf3aa13901cb10db9ac67d2f3 (diff)
downloadgit-7ae3df8c0aa3b7337ae9ac7b6184ac05985bf996.zip
git-7ae3df8c0aa3b7337ae9ac7b6184ac05985bf996.tar.gz
git-7ae3df8c0aa3b7337ae9ac7b6184ac05985bf996.tar.bz2
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>
Diffstat (limited to 'builtin-ls-files.c')
-rw-r--r--builtin-ls-files.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-ls-files.c b/builtin-ls-files.c
index f7c066b..48a3135 100644
--- a/builtin-ls-files.c
+++ b/builtin-ls-files.c
@@ -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);