Signed-off-by: Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> --- Documentation/git-rev-list.txt | 2 ++ Documentation/rev-list-options.txt | 13 ++++++++----- contrib/completion/git-completion.bash | 1 + t/t6009-rev-list-parent.sh | 4 +++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt index c5ea96f..415f4f0 100644 --- a/Documentation/git-rev-list.txt +++ b/Documentation/git-rev-list.txt @@ -17,7 +17,9 @@ SYNOPSIS [ \--merges ] [ \--no-merges ] [ \--min-parents=<number> ] + [ \--no-min-parents ] [ \--max-parents=<number> ] + [ \--no-max-parents ] [ \--first-parent ] [ \--remove-empty ] [ \--full-history ] diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index 0bbf7da..ea5c6c4 100644 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@ -81,14 +81,17 @@ endif::git-rev-list[] --min-parents=<number>:: --max-parents=<number>:: +--no-min-parents:: +--no-max-parents:: Show only commits which have at least (or at most) that many - commits, where negative parameters for `--max-parents=` denote - infinity (i.e. no upper limit). + commits. In particular, `--max-parents=1` is the same as `--no-merges`, + `--min-parents=2` is the same as `--merges`. `--max-parents=0` + gives all root commits and `--min-parents=3` all octopus merges. + -In particular, `--max-parents=1` is the same as `--no-merges`, -`--min-parents=2` is the same as `--merges`. `--max-parents=0` -gives all root commits and `--min-parents=3` all octopus merges. +`--no-min-parents` and `--no-max-parents` reset these limits (to no limit) +again. Equivalent forms are `--min-parents=0` (any commit has 0 or more +parents) and `--max-parents=-1` (negative numbers denote no upper limit). --first-parent:: Follow only the first parent commit upon seeing a merge diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 4da087e..d5215e8 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1578,6 +1578,7 @@ __git_log_common_options=" --max-age= --since= --after= --min-age= --until= --before= --min-parents= --max-parents= + --no-min-parents --no-max-parents " # Options that go well for log and gitk (not shortlog) __git_log_gitk_options=" diff --git a/t/t6009-rev-list-parent.sh b/t/t6009-rev-list-parent.sh index 5309378..fc89d6d 100755 --- a/t/t6009-rev-list-parent.sh +++ b/t/t6009-rev-list-parent.sh @@ -107,7 +107,9 @@ test_expect_success 'rev-list override and infinities' ' check_revlist "--min-parents=2 --max-parents=1 --max-parents=3" tripus normalmerge && check_revlist "--min-parents=1 --min-parents=2 --max-parents=7" tetrapus tripus normalmerge && check_revlist "--min-parents=2 --max-parents=8" tetrapus tripus normalmerge && - check_revlist "--min-parents=2 --max-parents=-1" tetrapus tripus normalmerge + check_revlist "--min-parents=2 --max-parents=-1" tetrapus tripus normalmerge && + check_revlist "--min-parents=2 --no-max-parents" tetrapus tripus normalmerge && + check_revlist "--max-parents=0 --min-parents=1 --no-min-parents" one five ' test_expect_success 'set up dodecapus' ' -- 1.7.4.1.511.g72e46 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html