Code

revisions: split out handle_revision_pseudo_opt function
[git.git] / builtin / ls-files.c
index bb4f612b3d48c453d551f251b65887beb283ec7b..fb2d5f4b1fb0ce9ef2fb0c4099b5fea6d07b6838 100644 (file)
@@ -424,7 +424,7 @@ int report_path_error(const char *ps_matched, const char **pathspec, int prefix_
 }
 
 static const char * const ls_files_usage[] = {
-       "git ls-files [options] [<file>]*",
+       "git ls-files [options] [<file>...]",
        NULL
 };
 
@@ -530,6 +530,9 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix)
                OPT_END()
        };
 
+       if (argc == 2 && !strcmp(argv[1], "-h"))
+               usage_with_options(ls_files_usage, builtin_ls_files_options);
+
        memset(&dir, 0, sizeof(dir));
        prefix = cmd_prefix;
        if (prefix)