Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-27 23:07:44 +0400
committerJunio C Hamano <gitster@pobox.com>2010-06-27 23:07:44 +0400
commita81f1a825bebe1b4d202832b804957d1547d7f60 (patch)
treea89891f5eb9092fbcd2e929cb591c6fb8791d5d5 /revision.c
parentf526d120f649ec4426b559e94e09655b5a4f2b87 (diff)
parent5853caec96a45ffa7768585acc649dc78eb99354 (diff)
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.c4
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=")) {