Skip to content

Commit a81f1a8

Browse files
committed
Merge branch 'jn/show-num-walks'
* jn/show-num-walks: DWIM 'git show -5' to 'git show --do-walk -5'
2 parents f526d12 + 5853cae commit a81f1a8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

revision.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,18 +1162,22 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
11621162

11631163
if (!prefixcmp(arg, "--max-count=")) {
11641164
revs->max_count = atoi(arg + 12);
1165+
revs->no_walk = 0;
11651166
} else if (!prefixcmp(arg, "--skip=")) {
11661167
revs->skip_count = atoi(arg + 7);
11671168
} else if ((*arg == '-') && isdigit(arg[1])) {
11681169
/* accept -<digit>, like traditional "head" */
11691170
revs->max_count = atoi(arg + 1);
1171+
revs->no_walk = 0;
11701172
} else if (!strcmp(arg, "-n")) {
11711173
if (argc <= 1)
11721174
return error("-n requires an argument");
11731175
revs->max_count = atoi(argv[1]);
1176+
revs->no_walk = 0;
11741177
return 2;
11751178
} else if (!prefixcmp(arg, "-n")) {
11761179
revs->max_count = atoi(arg + 2);
1180+
revs->no_walk = 0;
11771181
} else if (!prefixcmp(arg, "--max-age=")) {
11781182
revs->max_age = atoi(arg + 10);
11791183
} else if (!prefixcmp(arg, "--since=")) {

0 commit comments

Comments
 (0)