summaryrefslogtreecommitdiff
path: root/git-debrebase
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-24 19:56:12 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-24 19:56:12 +0100
commit0a2ab1fafe5fe43e9ff07e9600bddfa4fd892c35 (patch)
treeec9472358feb4a8610634af5d428d43f8af44ed1 /git-debrebase
parent5e3b368807710c9bb083404efefccb271b852619 (diff)
git-debrebase: trees_diff_walk: Refactor $all to \%opts
No callers pass this so NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'git-debrebase')
-rwxr-xr-xgit-debrebase8
1 files changed, 5 insertions, 3 deletions
diff --git a/git-debrebase b/git-debrebase
index 4bfe095..7629a14 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;