static const char *tag_killed = "";
static const char *tag_modified = "";
-static char *exclude_per_dir = NULL;
+static const char *exclude_per_dir = NULL;
/* We maintain three exclude pattern lists:
* EXC_CMDL lists patterns explicitly given on the command line.
static const char ls_files_usage[] =
"git-ls-files [-z] [-t] (--[cached|deleted|others|stage|unmerged|killed|modified])* "
"[ --ignored ] [--exclude=<pattern>] [--exclude-from=<file>] "
- "[ --exclude-per-directory=<filename> ]";
+ "[ --exclude-per-directory=<filename> ] [--] [<file>]*";
-int main(int argc, char **argv)
+int main(int argc, const char **argv)
{
int i;
int exc_given = 0;
prefix_offset = strlen(prefix);
for (i = 1; i < argc; i++) {
- char *arg = argv[i];
+ const char *arg = argv[i];
+ if (!strcmp(arg, "--")) {
+ i++;
+ break;
+ }
if (!strcmp(arg, "-z")) {
line_terminator = 0;
continue;