From: Ian Jackson Date: Fri, 24 Aug 2018 18:56:12 +0000 (+0100) Subject: git-debrebase: trees_diff_walk: Refactor $all to \%opts X-Git-Tag: archive/debian/6.10~72 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=0a2ab1fafe5fe43e9ff07e9600bddfa4fd892c35 git-debrebase: trees_diff_walk: Refactor $all to \%opts No callers pass this so NFC. Signed-off-by: Ian Jackson --- 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;