chiark / gitweb /
dgit: quilt analysis: Replace H2O with O2H
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 9 Oct 2016 19:44:12 +0000 (20:44 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 10 Oct 2016 00:01:11 +0000 (01:01 +0100)
Right now the direction of the diff does not matter, but soon it will,
and the natural direction is O2H, not O2H.  Change all references.
No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index c1b1c25374aeaae483ccee3fbb67bdb229d66863..5acce9725fa0528d9ab958f3a99aedcfcaf30f54 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3793,7 +3793,7 @@ sub quiltify_splitbrain ($$$$$$) {
     local $ENV{GIT_AUTHOR_DATE} =  $authline[2];
 
     if ($quilt_mode =~ m/gbp|unapplied/ &&
     local $ENV{GIT_AUTHOR_DATE} =  $authline[2];
 
     if ($quilt_mode =~ m/gbp|unapplied/ &&
-       ($diffbits->{H2O} & 01)) {
+       ($diffbits->{O2H} & 01)) {
        my $msg =
  "--quilt=$quilt_mode specified, implying patches-unapplied git tree\n".
  " but git tree differs from orig in upstream files.";
        my $msg =
  "--quilt=$quilt_mode specified, implying patches-unapplied git tree\n".
  " but git tree differs from orig in upstream files.";
@@ -3827,7 +3827,7 @@ END
  .gitignores: but, such patches exist in debian/patches.
 END
     }
  .gitignores: but, such patches exist in debian/patches.
 END
     }
-    if (($diffbits->{H2O} & 02) && # user has modified .gitignore
+    if (($diffbits->{O2H} & 02) && # user has modified .gitignore
        !($diffbits->{O2A} & 02)) { # patches do not change .gitignore
        quiltify_splitbrain_needed();
        progress "dgit view: creating patch to represent .gitignore changes";
        !($diffbits->{O2A} & 02)) { # patches do not change .gitignore
        quiltify_splitbrain_needed();
        progress "dgit view: creating patch to represent .gitignore changes";
@@ -4497,14 +4497,14 @@ END
         # H = user's HEAD
         # O = orig, without patches applied
         # A = "applied", ie orig with H's debian/patches applied
         # H = user's HEAD
         # O = orig, without patches applied
         # A = "applied", ie orig with H's debian/patches applied
-        H2O => quiltify_trees_differ($headref,  $unapplied, 1,\%editedignores),
+        O2H => quiltify_trees_differ($unapplied,$headref,   1,\%editedignores),
         H2A => quiltify_trees_differ($headref,  $oldtiptree,1),
         O2A => quiltify_trees_differ($unapplied,$oldtiptree,1),
     };
 
     my @dl;
     foreach my $b (qw(01 02)) {
         H2A => quiltify_trees_differ($headref,  $oldtiptree,1),
         O2A => quiltify_trees_differ($unapplied,$oldtiptree,1),
     };
 
     my @dl;
     foreach my $b (qw(01 02)) {
-        foreach my $v (qw(H2O O2A H2A)) {
+        foreach my $v (qw(O2H O2A H2A)) {
             push @dl, ($diffbits->{$v} & $b) ? '##' : '==';
         }
     }
             push @dl, ($diffbits->{$v} & $b) ? '##' : '==';
         }
     }
@@ -4517,7 +4517,7 @@ END
                                  $dl[2],                     $dl[5];
 
     my @failsuggestion;
                                  $dl[2],                     $dl[5];
 
     my @failsuggestion;
-    if (!($diffbits->{H2O} & $diffbits->{O2A})) {
+    if (!($diffbits->{O2H} & $diffbits->{O2A})) {
         push @failsuggestion, "This might be a patches-unapplied branch.";
     }  elsif (!($diffbits->{H2A} & $diffbits->{O2A})) {
         push @failsuggestion, "This might be a patches-applied branch.";
         push @failsuggestion, "This might be a patches-unapplied branch.";
     }  elsif (!($diffbits->{H2A} & $diffbits->{O2A})) {
         push @failsuggestion, "This might be a patches-applied branch.";