X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=ls-files.c;h=f47114a168f3a7479cbe147f953e5f56af3d2dfc;hb=500b97e4bb184c954a52550843e6314ecf97a208;hp=956be09350f6c17a479e96ab8e42575e1ce60762;hpb=af215114f52af0f308ef19f67e544df8ea5e4ac2;p=git.git diff --git a/ls-files.c b/ls-files.c index 956be093..f47114a1 100644 --- a/ls-files.c +++ b/ls-files.c @@ -530,7 +530,7 @@ static void verify_pathspec(void) static const char ls_files_usage[] = "git-ls-files [-z] [-t] (--[cached|deleted|others|stage|unmerged|killed|modified])* " "[ --ignored ] [--exclude=] [--exclude-from=] " - "[ --exclude-per-directory= ]"; + "[ --exclude-per-directory= ] [--] []*"; int main(int argc, const char **argv) { @@ -544,6 +544,10 @@ int main(int argc, const char **argv) for (i = 1; i < argc; i++) { const char *arg = argv[i]; + if (!strcmp(arg, "--")) { + i++; + break; + } if (!strcmp(arg, "-z")) { line_terminator = 0; continue;