GNU bug report logs - #24397
Binary files and --label option

Previous Next

Package: diffutils;

Reported by: Jean Delvare <jdelvare <at> suse.de>

Date: Fri, 9 Sep 2016 15:35:02 UTC

Severity: normal

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jean Delvare <jdelvare <at> suse.de>
To: bug-diffutils <at> gnu.org
Subject: Binary files and --label option
Date: Fri, 9 Sep 2016 11:30:32 +0200
Hi all,

I am maintaining quilt [1]. Up to diffutils version 3.3, diff would
return an error for binary files. This made it easy for us to detect
binary files and exclude them from the patches generated by quilt.

However since version 3.4 of diffutils, binary files no longer trigger
an error. This causes quilt to add the output of the command to the
generated patch. In my example, it looks like this:

Binary files w.orig/test.bin    2016-09-09 10:19:10.621752409 +0200 and w/test.bin      2016-09-09 10:19:24.349917252 +0200 differ

The reason for this strange output is that we use the --label option to
fine-tune the generated patches. It works fine for text files, but as
you can see, for binary files the result isn't as expected. Timestamps
are not supposed to be printed in the output in this case. Without the
--label options I get:

Binary files .pc/test.diff/test.bin and test.bin differ

which no longer has the timestamps, but doesn't have the names I want
(it exposes quilt internals which the user should not have to care
about.) So I am stuck.

Do you have any idea how this problem could be solved? In quilt I will
most likely add a test to check if the output starts with "Binary
files" and exclude the file again. But I think the problem is more
general than this. It seems we would need separate --label options for
the text and binary cases, as you may want to include the timestamp (or
any other extra information) for regular diff output, while you only
want the file names in the binary case. Maybe we need a new option
--file-name for the latter?

[1] https://savannah.nongnu.org/projects/quilt

Thanks,
-- 
Jean Delvare
SUSE L3 Support




This bug report was last modified 8 years and 281 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.