From nobody Sun Apr 12 13:44:13 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftsG56HDFz6ZMBH for ; Sun, 12 Apr 2026 13:44:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftsG51v03z3kYH for ; Sun, 12 Apr 2026 13:44:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776001453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZYXCpJ5Nih4p+EsepGzid9NT6ja7SNuGsCUaksxGA50=; b=jFLVGLBcWO3MsUaHluOb/CeVljTgxU2H5GgByrzbtg8qpVneqjHXzfH/2q3MODsC9aDMF8 2WhTyyuhNsqjr3uUBKAWENRzQ+gxXedl+qOfUmNpfqYbIB6b4umqGnlbA38+B55ndlf26G ZAVgLtD5gTrdvWiehExRn4am2bL1+/Z84INNTTAJDdAi+F35R9BH2P8wUQu7ZyxCjN1YPl Ve3zJ5yoyDq2gK9jm4UH71U5grcyMnXmQmv/JUrbjOMvcINpGFPqsJUU8z/v5nIYy6ih7t pOLDqp5e1QYOukUJQ0aP3tCntWXwQSqw+Cm+kV3pAxTy7lL+cXT7yyqfU+6/lQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776001453; a=rsa-sha256; cv=none; b=XH+9c92VGu9+a6EL/ZBLiUn5E5kmpATDfEMDLa07EKzHixpNcXesbBKdQ5gT+XkIZ/xjcJ L+L8/kU4oNWVtNfOTCQ5q8SEq0U/3824b8OpWYwKscInQ4wvcIq0fcNM5J6gRGjeT6hb5C W/AqsVbOqTWOQ+DIVsMomOuKSkfXtX1LyhotX8GSRE6qI3Yez/u/b1UxIklBC/yB8UQ9X4 3znzwe5Njb+2NgYdKWJDtAWcSB076IDTR+tGgSC36G/zETt+mppmmRzOCg6D1xOEt4jX5w CuxEhJTI/DYuBCr89EPgIBE55jjo7kmOP0/wiP1UCoFGrOL6npqq+9POka28Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776001453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZYXCpJ5Nih4p+EsepGzid9NT6ja7SNuGsCUaksxGA50=; b=h3v2tLjvbhdsUnZOBA54Av0KU3Z4K9lk94Q1Z+OiznBnA7LiemU5nmJEU4e+k1WsKz9314 s0JZnxh5FdCtXHpZJQJyb3P8qvlIp26FJRiIe6I5H6Qg6n9k6+v9mMpu6t7XLtMasN2jKv bpNV2EWJTZicM06Op7zbKij5mztmujFsUg0++A2JasOomQgWRY94V9+cexpqEMRtELKskl ag/Z1LhpRGmKLnr9TJq+A/jopcqOh+eZUAPJI8yl+gUHk+mC0YQ3mZvbspDbV9rUomZdv1 GTtNF4jcal0ZIfAyMdIAPBBsq/Ei7RnT3L7c0viQhhab8dvG2+bhtHQMOylVng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftsG50Ypxz4NY for ; Sun, 12 Apr 2026 13:44:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4328d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 12 Apr 2026 13:44:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 6613b91799ce - stable/14 - patch: test for unified diffs with spaces in filenames List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6613b91799ce956c5a33ac9415f9bb700d1b5022 Auto-Submitted: auto-generated Date: Sun, 12 Apr 2026 13:44:13 +0000 Message-Id: <69dba1ad.4328d.1da9519a@gitrepo.freebsd.org> The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6613b91799ce956c5a33ac9415f9bb700d1b5022 commit 6613b91799ce956c5a33ac9415f9bb700d1b5022 Author: Kyle Evans AuthorDate: 2025-08-29 19:24:35 +0000 Commit: Kyle Evans CommitDate: 2026-04-12 13:43:38 +0000 patch: test for unified diffs with spaces in filenames The older GNU patch that we had in base did not properly handle spaces in filenames in unified diffs, but bsdpatch seems to have handled this fine at least since the version we imported into base initially. Add a test with spaces in the filename specifically to be sure. PR: 181272 (cherry picked from commit cc36624b2a8be3fbf180c5ae8d310d86486884bc) --- usr.bin/patch/tests/unified_patch_test.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/usr.bin/patch/tests/unified_patch_test.sh b/usr.bin/patch/tests/unified_patch_test.sh index 7d4b74182c41..a91332908773 100755 --- a/usr.bin/patch/tests/unified_patch_test.sh +++ b/usr.bin/patch/tests/unified_patch_test.sh @@ -141,6 +141,23 @@ file_removal_body() atf_check -o inline:"y\n" cat foo } +atf_test_case namespace +namespace_head() +{ + atf_set "descr" "Test that patch(1) handles files with spaces in the name" +} +namespace_body() +{ + echo "ABC" > "with spaces.orig" + echo "ZYX" > "with spaces" + + atf_check -s not-exit:0 -o save:spaces.diff \ + diff -u "with spaces.orig" "with spaces" + + atf_check mv "with spaces.orig" "with spaces" + atf_check -o not-empty patch < spaces.diff +} + atf_test_case plinelen plinelen_body() { @@ -166,5 +183,6 @@ atf_init_test_cases() atf_add_test_case file_creation atf_add_test_case file_nodupe atf_add_test_case file_removal + atf_add_test_case namespace atf_add_test_case plinelen }