chiark / gitweb /
git-debrebase: fix several calls to git_cat_file
[dgit.git] / git-debrebase
index b83cceb365acaaa1ec253a13a506db4f1e919b40..a8cf7917d76656a735be3c776c6fcec8b447eac1 100755 (executable)
@@ -116,7 +116,7 @@ sub dd ($) {
 
 sub get_commit ($) {
     my ($objid) = @_;
-    my $data = git_cat_file $objid, 'commit';
+    my $data = (git_cat_file $objid, 'commit');
     $data =~ m/(?<=\n)\n/ or die "$objid ($data) ?";
     return ($`,$');
 }
@@ -200,8 +200,8 @@ sub get_differs ($$) {
            if ($mode eq 'A' && !m/\.series$/s) {
                $ok = 1;
            } elsif ($mode eq 'M' && $_ eq 'series') {
-               my $x_s = git_cat_file "$x:debian/patches/series", 'blob';
-               my $y_s = git_cat_file "$y:debian/patches/series", 'blob';
+               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";
                $ok = $x_s eq substr($y_s, 0, length $x_s);
            } else {
@@ -877,7 +877,7 @@ sub cmd_new_upstream_v0 () {
 
     if ($old_upstream->{Msg} =~ m{^\[git-debrebase }m) {
        if ($old_upstream->{Msg} =~
- m{^\[git-debrebase new-upstream combine \.((?: $extra_orig_namepart_re)+)\]}
+ m{^\[git-debrebase (?:\w*-)?upstream combine \.((?: $extra_orig_namepart_re)+)\]}
           ) {
            my @oldpieces = ('', split / /, $1);
            my $parentix = -1 + scalar @{ $old_upstream->{Parents} };