diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-07-09 14:37:10 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-06-16 12:25:49 +0100 |
commit | 16cef99e719ad15ae70839a3a45a4d5b1f04a1b3 (patch) | |
tree | c045326f387794a40e9195330065a59c3735d43d /git-debrebase | |
parent | 167be8cc683c1f8b47d5f05f7792c04d57fac092 (diff) |
git-debrebase: wip
Diffstat (limited to 'git-debrebase')
-rwxr-xr-x | git-debrebase | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/git-debrebase b/git-debrebase index 5fa62b5..e5e9203 100755 --- a/git-debrebase +++ b/git-debrebase @@ -176,8 +176,26 @@ sub get_differs ($$) { } if ($differs & D_PAT_OTH) { + my $mode; + $differs &= ~D_PAT_OTH; + my $pat_oth = sub { + $differs |= D_PAT_OTH; + no qw(exiting); last; + }; $rundiff([qw(--name-status)], ':debian/patches', sub { - + no warnings qw(exiting); + if (!defined $mode) { + $mode = $f; next; + } elsif ($mode eq 'A' && $f !~ m/^\w+\.series$/) { + } elsif ($mode eq 'M' && $f eq 'series') { + my $x_s = git_cat_file "$x:debian/patches/series", 'blob'; + my $y_s = git_cat_file "$y:debian/patches/series", 'blob'; + chomp $x_s; $x_s .= "\n"; + $pat_oth->() unless $x_s = substr($y_s, 0, length $x_s); + } else { + $pat_oth->(); + } + $mode = undef; }); |