|
|
@ -868,6 +868,16 @@ int cmd_grep(int argc, const char **argv, const char *prefix) |
|
|
|
PARSE_OPT_STOP_AT_NON_OPTION | |
|
|
|
PARSE_OPT_STOP_AT_NON_OPTION | |
|
|
|
PARSE_OPT_NO_INTERNAL_HELP); |
|
|
|
PARSE_OPT_NO_INTERNAL_HELP); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
* skip a -- separator; we know it cannot be |
|
|
|
|
|
|
|
* separating revisions from pathnames if |
|
|
|
|
|
|
|
* we haven't even had any patterns yet |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
if (argc > 0 && !opt.pattern_list && !strcmp(argv[0], "--")) { |
|
|
|
|
|
|
|
argv++; |
|
|
|
|
|
|
|
argc--; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* First unrecognized non-option token */ |
|
|
|
/* First unrecognized non-option token */ |
|
|
|
if (argc > 0 && !opt.pattern_list) { |
|
|
|
if (argc > 0 && !opt.pattern_list) { |
|
|
|
append_grep_pattern(&opt, argv[0], "command line", 0, |
|
|
|
append_grep_pattern(&opt, argv[0], "command line", 0, |
|
|
|