diff --git a/diff-no-index.c b/diff-no-index.c
index b60d3455dae14a7a2cf2daeec8eb47fc7dcd9a09..39868e2a8fa47e91f8d21814ac433b516fc9535c 100644 (file)
--- a/diff-no-index.c
+++ b/diff-no-index.c
/* Were we asked to do --no-index explicitly? */
for (i = 1; i < argc; i++) {
- if (!strcmp(argv[i], "--"))
- return;
+ if (!strcmp(argv[i], "--")) {
+ i++;
+ break;
+ }
if (!strcmp(argv[i], "--no-index"))
no_index = 1;
if (argv[i][0] != '-')
int j;
if (!strcmp(argv[i], "--no-index"))
i++;
- else if (!strcmp(argv[1], "-q"))
+ else if (!strcmp(argv[i], "-q"))
options |= DIFF_SILENT_ON_REMOVED;
+ else if (!strcmp(argv[i], "--"))
+ i++;
else {
j = diff_opt_parse(&revs->diffopt, argv + i, argc - i);
if (!j)