return unless $path;
my $info = $self->{info}{$path};
+ if (not exists $info->{new}) {
+ $info->{new} = '';
+ $info->{nodiff} = 1;
+ }
+
if (exists $info->{new}) {
no warnings 'uninitialized';
my $rpath = $self->{report} ? catfile($self->{report}, $path) : $path;
$mode = "new file mode $nmode\n";
}
+ my $index = "";
+ $index = "index $osha1..$nsha1\n" unless $self->{info}{$path}{nodiff};
+
print $fh (
"diff --git $ofile $nfile\n",
$name,
$mode,
- "index $osha1..$nsha1\n"
+ $index
);
+ return if $self->{info}{$path}{nodiff};
+
unshift @_, $self->_output_fh;
push @_, $ofile, $nfile;