X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=revision.c;h=7e82efd9324e84582732485c53c6c25a24c29997;hb=0b9dca434f5d9208a26f47f7ec11453f1cfdfae8;hp=7847921658c0f0b13c51650057b907ee431b1378;hpb=a214afd25b7077fd4efebb90cf65d5403ce82dc0;p=git.git diff --git a/revision.c b/revision.c index 784792165..7e82efd93 100644 --- a/revision.c +++ b/revision.c @@ -1162,18 +1162,22 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg if (!prefixcmp(arg, "--max-count=")) { revs->max_count = atoi(arg + 12); + revs->no_walk = 0; } else if (!prefixcmp(arg, "--skip=")) { revs->skip_count = atoi(arg + 7); } else if ((*arg == '-') && isdigit(arg[1])) { /* accept -, like traditional "head" */ revs->max_count = atoi(arg + 1); + revs->no_walk = 0; } else if (!strcmp(arg, "-n")) { if (argc <= 1) return error("-n requires an argument"); revs->max_count = atoi(argv[1]); + revs->no_walk = 0; return 2; } else if (!prefixcmp(arg, "-n")) { revs->max_count = atoi(arg + 2); + revs->no_walk = 0; } else if (!prefixcmp(arg, "--max-age=")) { revs->max_age = atoi(arg + 10); } else if (!prefixcmp(arg, "--since=")) { @@ -1249,6 +1253,8 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg revs->boundary = 1; } else if (!strcmp(arg, "--left-right")) { revs->left_right = 1; + } else if (!strcmp(arg, "--count")) { + revs->count = 1; } else if (!strcmp(arg, "--cherry-pick")) { revs->cherry_pick = 1; revs->limited = 1; @@ -1308,8 +1314,8 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg else strbuf_addstr(&buf, "refs/notes/"); strbuf_addstr(&buf, arg+13); - string_list_append(strbuf_detach(&buf, NULL), - revs->notes_opt.extra_notes_refs); + string_list_append(revs->notes_opt.extra_notes_refs, + strbuf_detach(&buf, NULL)); } else if (!strcmp(arg, "--no-notes")) { revs->show_notes = 0; revs->show_notes_given = 1;