diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-06-04 16:57:35 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-07-16 16:47:47 +0100 |
commit | 7f4b27dad75955090b3777216c31c9d0ab073f49 (patch) | |
tree | 5e77172319f17427d3678804df0433f1ad47f4d3 /dgit | |
parent | dade5a9eae9cd97cddd6ac80ee9ae3c6b8329190 (diff) |
Split brain: Provide optional $ignorenamesr argument to quiltify_trees_differ
We are going to need this information to construct the substantive
diff for the .gitignores patch.
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2515,8 +2515,8 @@ END } } -sub quiltify_trees_differ ($$;$) { - my ($x,$y,$finegrained) = @_; +sub quiltify_trees_differ ($$;$$) { + my ($x,$y,$finegrained,$ignorenamesr) = @_; # returns true iff the two tree objects differ other than in debian/ # with $finegrained, # returns bitmask 01 - differ in upstream files except .gitignore @@ -2531,7 +2531,9 @@ sub quiltify_trees_differ ($$;$) { my $r = 0; foreach my $f (split /\0/, $diffs) { next if $f =~ m#^debian(?:/.*)?$#s; - $r |= ($f =~ m#^(?:.*/)?.gitignore$#s) ? 02 : 01; + my $isignore = $f =~ m#^(?:.*/)?.gitignore$#s; + $r |= $isignore ? 02 : 01; + $ignorenamesr->{$f}=1 if $ignorenamesr && $isignore; } printdebug "quiltify_trees_differ $x $y => $r\n"; return $r; |