diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-08-24 20:23:22 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-08-24 20:26:21 +0100 |
commit | 8aec7aff3961d7521e9afb480bc5cb5632fa6547 (patch) | |
tree | eeb051c22aa7573d88e87fa8384840d2a49091a1 /git-debrebase | |
parent | fc0f0a517d86fc5e4b1d9089c9960778435651cf (diff) |
git-debrebase: classify: Do not misclassify patches in subdirs
The old get_differs algorithm would recurse in debian/patches.
The new one failed to do that. Fix that.
Closes: #907206.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'git-debrebase')
-rwxr-xr-x | git-debrebase | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/git-debrebase b/git-debrebase index 58d3a4a..ddb47bf 100755 --- a/git-debrebase +++ b/git-debrebase @@ -310,13 +310,16 @@ sub get_differs ($$) { my $xp = $ix && "$xd/patches"; my $yp = $iy && "$yd/patches"; - trees_diff_walk $xp, $yp, sub { + trees_diff_walk { recurse=>1 }, $xp, $yp, sub { my ($n,$ix,$iy) = @_; # analyse difference in debian/patches my $ok; - if ($n !~ m/\.series$/s && !$ix && $plain->($iy)) { + if ($n =~ m{/$}s) { + # we are recursing; directories may appear and disappear + $ok = 1; + } elsif ($n !~ m/\.series$/s && !$ix && $plain->($iy)) { $ok = 1; } elsif ($n eq 'series' && $plain->($ix) && $plain->($iy)) { my $x_s = (git_cat_file "$xp/series", 'blob'); |