git: fcb34faf7067 - main - Mk/Scripts/smart_makepatch.sh: Force diff to produce the patch file instead of "Binary files ... differ" message
Po-Chuan Hsieh
sunpoet at FreeBSD.org
Wed Jul 14 16:20:15 UTC 2021
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=fcb34faf706733a667358b293970fac444251828
commit fcb34faf706733a667358b293970fac444251828
Author: Po-Chuan Hsieh <sunpoet at FreeBSD.org>
AuthorDate: 2021-07-14 16:06:05 +0000
Commit: Po-Chuan Hsieh <sunpoet at 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(-)
diff --git a/Mk/Scripts/smart_makepatch.sh b/Mk/Scripts/smart_makepatch.sh
index 5146d01a84cd..96ad7e6ee78c 100644
--- a/Mk/Scripts/smart_makepatch.sh
+++ b/Mk/Scripts/smart_makepatch.sh
@@ -193,7 +193,7 @@ regenerate_patches() {
NEW=${ORIG%.orig}
cmp -s ${ORIG} ${NEW} && continue
OUT=${REGENNED}/$(std_patch_filename ${NEW})
- TZ=UTC diff -udp ${ORIG} ${NEW} | sed \
+ TZ=UTC diff -audp ${ORIG} ${NEW} | sed \
-e '/^---/s|\.[0-9]* +0000$| UTC|' \
-e '/^+++/s|\([[:blank:]][-0-9:.+]*\)*$||' \
> ${OUT} || true
More information about the dev-commits-ports-all
mailing list