Introduce "--merges" as an option to undo "--no-merges". This is useful whenever you want to override a default such as those from "format-patch", "--cherry" or aliases which may use "--no-merges". Signed-off-by: Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> --- Documentation/git-rev-list.txt | 1 + Documentation/rev-list-options.txt | 4 +++- contrib/completion/git-completion.bash | 2 +- revision.c | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt index 020e585..6379f21 100644 --- a/Documentation/git-rev-list.txt +++ b/Documentation/git-rev-list.txt @@ -15,6 +15,7 @@ SYNOPSIS [ \--min-age=<timestamp> ] [ \--sparse ] [ \--merges-only ] + [ \--merges ] [ \--no-merges ] [ \--first-parent ] [ \--remove-empty ] diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index 78ea305..e11145b 100644 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@ -74,9 +74,11 @@ endif::git-rev-list[] Print only merge commits. +--merges:: --no-merges:: - Do not print commits with more than one parent. + Do resp. do not print commits with more than one parent. + For most commands, `--merges` is the default. --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 298dddc..db56153 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1570,7 +1570,7 @@ _git_ls_tree () __git_log_common_options=" --not --all --branches --tags --remotes - --first-parent --merges-only --no-merges + --first-parent --merges-only --merges --no-merges --max-count= --max-age= --since= --after= --min-age= --until= --before= diff --git a/revision.c b/revision.c index bd2fedd..a9ec574 100644 --- a/revision.c +++ b/revision.c @@ -1278,6 +1278,8 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg revs->remove_empty_trees = 1; } else if (!strcmp(arg, "--merges-only")) { revs->merges_only = 1; + } else if (!strcmp(arg, "--merges")) { + revs->no_merges = 0; } else if (!strcmp(arg, "--no-merges")) { revs->no_merges = 1; } else if (!strcmp(arg, "--boundary")) { -- 1.7.4.1.464.gf81ff -- 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