only add "# original source" if a redirect is active

This commit is contained in:
Antony Dovgal 2009-01-05 09:18:57 +00:00
parent a26c94c7d9
commit 9a06642ab0

View File

@ -1870,7 +1870,9 @@ COMMAND $cmd
// write .diff
$diff = generate_diff($wanted, $wanted_re, $output);
$diff = "# original source file: $shortname\n" . $diff;
if (is_array($IN_REDIRECT)) {
$diff = "# original source file: $shortname\n" . $diff;
}
show_file_block('diff', $diff);
if (strpos($log_format, 'D') !== false && file_put_contents($diff_filename, (binary) $diff, FILE_BINARY) === false) {
error("Cannot create test diff - $diff_filename");