Bug 257027 - Mk/Scripts/smart_makepatch.sh: Force diff to produce the patch file instead of "Binary files ... differ" message
Summary: Mk/Scripts/smart_makepatch.sh: Force diff to produce the patch file instead o...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-06 20:21 UTC by Po-Chuan Hsieh
Modified: 2021-07-14 16:25 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Po-Chuan Hsieh freebsd_committer freebsd_triage 2021-07-06 20:21:23 UTC
Patch: https://people.FreeBSD.org/~sunpoet/patch/Mk-Scripts-smart_makepatch.sh.txt

Force diff to produce the patch file instead of "Binary files ... differ" message
It helps avoid generating wrong patches, e.g. patch-grpc.gemspec in r567838 [1].

from diff manpage:
    -a --text
        Treat all files as ASCII text.  Normally diff will simply print
        “Binary files ... differ” if files contain binary characters.
        Use of this option forces diff to produce a diff.

[1] https://cgit.freebsd.org/ports/diff/net/rubygem-grpc130/files/patch-grpc.gemspec?id=073c1c710a0c7254820adab9920c1903ace83fae
Comment 1 Po-Chuan Hsieh freebsd_committer freebsd_triage 2021-07-06 20:29:37 UTC
Assign to maintainer.
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2021-07-07 07:03:55 UTC
approved
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-07-14 16:20:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fcb34faf706733a667358b293970fac444251828

commit fcb34faf706733a667358b293970fac444251828
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2021-07-14 16:06:05 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2021-07-14 16:15:03 +0000

    Mk/Scripts/smart_makepatch.sh: Force diff to produce the patch file instead of "Binary files ... differ" message

    It helps avoid generating wrong patches, e.g. patch-grpc.gemspec in r567838 [1].

    from diff manpage:
        -a --text
            Treat all files as ASCII text.  Normally diff will simply print
            "Binary files ... differ" if files contain binary characters.
            Use of this option forces diff to produce a diff.

    [1] https://cgit.FreeBSD.org/ports/diff/net/rubygem-grpc130/files/patch-grpc.gemspec?id=073c1c710a0c7254820adab9920c1903ace83fae

    PR:             257027
    Approved by:    mat (portmgr)

 Mk/Scripts/smart_makepatch.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 4 Po-Chuan Hsieh freebsd_committer freebsd_triage 2021-07-14 16:25:28 UTC
Committed. Thanks!