From f225e1a93f302f7b16463025776bd797ce6e9d82 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 13 Nov 2007 01:24:58 -0800 Subject: [PATCH] git-topic: drop merges by default --- git-topic.perl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/git-topic.perl b/git-topic.perl index 40e16d3475..f875d0d5d8 100755 --- a/git-topic.perl +++ b/git-topic.perl @@ -11,6 +11,7 @@ my $base = 'next'; my @stage = qw(next pu); my @mark = ('.', '?', '-', '+'); my $all = 0; +my $merges = 0; my @custom_stage; my @custom_mark; @@ -18,16 +19,18 @@ GetOptions("topic=s" => \$topic_pattern, "base=s" => \$base, "stage=s" => \@custom_stage, "mark=s" => \@custom_mark, + "merges!" => \$merges, "all!" => \$all) or die; if (@custom_stage) { @stage = @custom_stage; } if (@custom_mark) { @mark = @custom_mark; } +my @nomerges = $merges ? qw(--no-merges) : (); sub read_revs_short { my (@args) = @_; my @revs; - open(REVS, '-|', qw(git rev-list --no-merges), @args) + open(REVS, '-|', qw(git rev-list), @nomerges, @args) or die; while () { chomp; @@ -40,7 +43,7 @@ sub read_revs_short { sub read_revs { my ($bottom, $top, $mask) = @_; my @revs; - open(REVS, '-|', qw(git rev-list --pretty=oneline --no-merges), + open(REVS, '-|', qw(git rev-list --pretty=oneline), @nomerges, "$bottom..$top") or die; while () { -- 2.32.0.93.g670b81a890