diff options
-rw-r--r-- | Documentation/git-rev-list.txt | 9 | ||||
-rw-r--r-- | revision.c | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt index 0430139093..1c1978140f 100644 --- a/Documentation/git-rev-list.txt +++ b/Documentation/git-rev-list.txt @@ -37,6 +37,7 @@ SYNOPSIS [ \--merge ] [ \--reverse ] [ \--walk-reflogs ] + [ \--no-walk ] [ \--do-walk ] <commit>... [ \-- <paths>... ] DESCRIPTION @@ -398,6 +399,14 @@ These options are mostly targeted for packing of git repositories. Only useful with '--objects'; print the object IDs that are not in packs. +--no-walk:: + + Only show the given revs, but do not traverse their ancestors. + +--do-walk:: + + Overrides a previous --no-walk. + include::pretty-formats.txt[] diff --git a/revision.c b/revision.c index 00b75bc10b..16f35c7c18 100644 --- a/revision.c +++ b/revision.c @@ -1191,6 +1191,14 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch revs->reverse ^= 1; continue; } + if (!strcmp(arg, "--no-walk")) { + revs->no_walk = 1; + continue; + } + if (!strcmp(arg, "--do-walk")) { + revs->no_walk = 0; + continue; + } opts = diff_opt_parse(&revs->diffopt, argv+i, argc-i); if (opts > 0) { |