aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/ls-files.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/ls-files.c')
-rw-r--r--builtin/ls-files.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index 6eeb5cba78..a4431429b7 100644
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
@@ -5,8 +5,11 @@
*
* Copyright (C) Linus Torvalds, 2005
*/
+
+#define USE_THE_REPOSITORY_VARIABLE
+#define DISABLE_SIGN_COMPARE_WARNINGS
+
#include "builtin.h"
-#include "repository.h"
#include "config.h"
#include "convert.h"
#include "quote.h"
@@ -507,7 +510,7 @@ static int get_common_prefix_len(const char *common_prefix)
common_prefix_len = strlen(common_prefix);
/*
- * If the prefix has a trailing slash, strip it so that submodules wont
+ * If the prefix has a trailing slash, strip it so that submodules won't
* be pruned from the index.
*/
if (common_prefix[common_prefix_len - 1] == '/')
@@ -561,7 +564,10 @@ static int option_parse_exclude_standard(const struct option *opt,
return 0;
}
-int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix)
+int cmd_ls_files(int argc,
+ const char **argv,
+ const char *cmd_prefix,
+ struct repository *repo UNUSED)
{
int require_work_tree = 0, show_tag = 0, i;
char *max_prefix;
@@ -638,8 +644,8 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix)
};
int ret = 0;
- if (argc == 2 && !strcmp(argv[1], "-h"))
- usage_with_options(ls_files_usage, builtin_ls_files_options);
+ show_usage_with_options_if_asked(argc, argv,
+ ls_files_usage, builtin_ls_files_options);
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;