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

To reply to this bug, email your comments to 24397 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-diffutils <at> gnu.org:
bug#24397; Package diffutils. (Fri, 09 Sep 2016 15:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jean Delvare <jdelvare <at> suse.de>:
New bug report received and forwarded. Copy sent to bug-diffutils <at> gnu.org. (Fri, 09 Sep 2016 15:35:02 GMT) Full text and rfc822 format available.

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




Information forwarded to bug-diffutils <at> gnu.org:
bug#24397; Package diffutils. (Fri, 09 Sep 2016 15:55:01 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jean Delvare <jdelvare <at> suse.de>, 24397 <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#24397: Binary files and --label option
Date: Fri, 9 Sep 2016 08:54:33 -0700
On 09/09/2016 02:30 AM, Jean Delvare wrote:
> 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?

Yes, it does appear that the options need to be rethought. Also, there 
needs to be a better way to indicate symlinks and special files; that's 
a related issue.





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

Previous Next


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