apply: get rid of --index-info in favor of --build-fake-ancestor
[gitweb.git] / revision.c
index 038693caba69a9274b632510c9ee8a14a87b6eee..33d092c3c4b4c08fb6f39228e464219df4cb4f1c 100644 (file)
@@ -896,7 +896,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
                        continue;
                argv[i] = NULL;
                argc = i;
-               revs->prune_data = get_pathspec(revs->prefix, argv + i + 1);
+               if (argv[i + 1])
+                       revs->prune_data = get_pathspec(revs->prefix, argv + i + 1);
                seen_dashdash = 1;
                break;
        }
@@ -1023,6 +1024,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
                        }
                        if (!strcmp(arg, "--cherry-pick")) {
                                revs->cherry_pick = 1;
+                               revs->limited = 1;
                                continue;
                        }
                        if (!strcmp(arg, "--objects")) {
@@ -1150,6 +1152,10 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
                                        die("unknown date format %s", arg);
                                continue;
                        }
+                       if (!strcmp(arg, "--log-size")) {
+                               revs->show_log_size = 1;
+                               continue;
+                       }
 
                        /*
                         * Grepping the commit log
@@ -1273,6 +1279,9 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
                compile_grep_patterns(revs->grep_filter);
        }
 
+       if (revs->reverse && revs->reflog_info)
+               die("cannot combine --reverse with --walk-reflogs");
+
        return left;
 }