chiark / gitweb /
Split brain: quiltify_trees_differ supports $ignoregitignore (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Jun 2016 11:22:03 +0000 (12:22 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jul 2016 15:47:47 +0000 (16:47 +0100)
We are going to want to handle this specially.

dgit

diff --git a/dgit b/dgit
index 77f8819ef8858307c636aafbfdd9e956053d1d94..370986de49a919f60c26e37cedb821edd674148b 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2510,14 +2510,15 @@ END
     }
 }
 
     }
 }
 
-sub quiltify_trees_differ ($$) {
-    my ($x,$y) = @_;
+sub quiltify_trees_differ ($$;$) {
+    my ($x,$y,$ignoregitignore) = @_;
     # returns 1 iff the two tree objects differ other than in debian/
     local $/=undef;
     my @cmd = (@git, qw(diff-tree --name-only -z), $x, $y);
     my $diffs= cmdoutput @cmd;
     foreach my $f (split /\0/, $diffs) {
        next if $f eq 'debian';
     # returns 1 iff the two tree objects differ other than in debian/
     local $/=undef;
     my @cmd = (@git, qw(diff-tree --name-only -z), $x, $y);
     my $diffs= cmdoutput @cmd;
     foreach my $f (split /\0/, $diffs) {
        next if $f eq 'debian';
+       next if $f eq '.gitignore' && $ignoregitignore;
        return 1;
     }
     return 0;
        return 1;
     }
     return 0;