diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-27 12:07:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-27 12:07:44 -0700 |
commit | a81f1a825bebe1b4d202832b804957d1547d7f60 (patch) | |
tree | a89891f5eb9092fbcd2e929cb591c6fb8791d5d5 /revision.c | |
parent | f526d120f649ec4426b559e94e09655b5a4f2b87 (diff) | |
parent | 5853caec96a45ffa7768585acc649dc78eb99354 (diff) | |
download | git-a81f1a825bebe1b4d202832b804957d1547d7f60.tar.gz |
Merge branch 'jn/show-num-walks'
* jn/show-num-walks:
DWIM 'git show -5' to 'git show --do-walk -5'
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/revision.c b/revision.c index 7847921658..540358184d 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 -<digit>, 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=")) { |