diff options
author | Jeff King <peff@peff.net> | 2009-03-17 05:03:19 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-17 15:12:40 -0700 |
commit | 8ad3dae3a76ee42983da89ea9b5d9a4688f58f93 (patch) | |
tree | d35b58c4f4fcfd92bef61c4ad91455ce0b099a01 /builtin-ls-files.c | |
parent | fcfdf797db015e13623645c0be049db679d5daaa (diff) | |
download | git-8ad3dae3a76ee42983da89ea9b5d9a4688f58f93.tar.gz |
ls-files: require worktree when --deleted is given
The code will end up calling lstat() to check whether the
file still exists; obviously this doesn't work if we're not
in the worktree.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-ls-files.c')
-rw-r--r-- | builtin-ls-files.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin-ls-files.c b/builtin-ls-files.c index 9dec282fba..ca6f33d046 100644 --- a/builtin-ls-files.c +++ b/builtin-ls-files.c @@ -419,6 +419,7 @@ int cmd_ls_files(int argc, const char **argv, const char *prefix) } if (!strcmp(arg, "-d") || !strcmp(arg, "--deleted")) { show_deleted = 1; + require_work_tree = 1; continue; } if (!strcmp(arg, "-m") || !strcmp(arg, "--modified")) { |