From 0a2ab1fafe5fe43e9ff07e9600bddfa4fd892c35 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 24 Aug 2018 19:56:12 +0100 Subject: [PATCH] git-debrebase: trees_diff_walk: Refactor $all to \%opts No callers pass this so NFC. Signed-off-by: Ian Jackson --- git-debrebase | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/git-debrebase b/git-debrebase index 4bfe0952..7629a148 100755 --- a/git-debrebase +++ b/git-debrebase @@ -225,12 +225,14 @@ sub get_tree ($;$$) { } sub trees_diff_walk ($$$;$) { - # trees_diff_walk [$all,] $x, $y, sub {... } - # calls sub->($name, $ix, $iy) for each difference (with $all, each name) + # trees_diff_walk [{..opts...},] $x, $y, sub {... } + # calls sub->($name, $ix, $iy) for each difference # $x and $y are as for get_tree # where $name, $ix, $iy are $name and $info from get_tree - my $all = shift @_ if @_>=4; + # opts are all call even for names same in both + my $opts = shift @_ if @_>=4; my ($x,$y,$call) = @_; + my $all = $opts->{all}; return if !$all and $x eq $y; my @x = get_tree $x; my @y = get_tree $y; -- 2.30.2