summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 59f0f2f)
raw | patch | inline | side by side (parent: 59f0f2f)
author | Mike Hommey <mh@glandium.org> | |
Sat, 3 Nov 2007 11:23:12 +0000 (12:23 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 6 Nov 2007 06:47:57 +0000 (22:47 -0800) |
Signed-off-by: Mike Hommey <mh@glandium.org>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-ls-files.c | patch | blob | history |
diff --git a/builtin-ls-files.c b/builtin-ls-files.c
index b70da1863b221386a073ec8b7138cf0d91f52159..e0b856f4328a4df945f3dd0c3f0e1dc14020238f 100644 (file)
--- a/builtin-ls-files.c
+++ b/builtin-ls-files.c
break;
}
- if (require_work_tree && !is_inside_work_tree()) {
- const char *work_tree = get_git_work_tree();
- if (!work_tree || chdir(work_tree))
- die("This operation must be run in a work tree");
- }
+ if (require_work_tree && !is_inside_work_tree())
+ setup_work_tree();
pathspec = get_pathspec(prefix, argv + i);