From nobody Tue Oct 20 17:40:59 2026 X-Original-To: dev-commits-src-main@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 4j8KT73qQ4z6vr9S for ; Tue, 20 Oct 2026 17:40:59 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4j8KT70Y57z4hxS for ; Tue, 20 Oct 2026 17:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792518059; 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=7bFmdADfhrIAFc6KFH6z4NhqGk4hJ4qKUzNkRnymvck=; b=RFw3+OW9OW/CLHMLr53kmJ6MMVn6P6LJ4yiSpX6ObTLhWU33GiVyHWVGYpn+o0YGHw7Rnj zXsQNM2ggP3K2wCIM5bV32xzrccgHtaq5tf8wWh7+r4t2H8RuuRAYmj1uDZJ2bUD+AlUdc Yg4RUxv+oG9ogP61WYj+bB6mTgQA8w3uuiqSIfVNTtKijjXuhDVcWotxJJdqFmCOkQedEf JyL9GGN7RgYwi5MRShZEBAc2S/Pu1vS2eLNeVNP0jDeku5IjOJZ0Ztqu7kkrhbntxpGMkp NSyGm3EaobZ1QVSxOCK/kRLeMd6SAvw+Z73lapiWFM20FY5gLwlMXQt1uce/8w== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1792518059; b=qE95GMO57qRS+aj5h81kCBLTgQwOc4TJ6tyWDLhMRbTnXEe7qRhKIMxMVP8sfS4UXGFNRi m6d7OIOsBrWG0pqlo70qz/k6AomH+ah3+1D9YQs9U73H0cGb3lP99VU0HmmiNh6Cvnbo/C fEJWuYxwbGc3Kt5S5ylXy8slAeZ/NGjgfl75pYC/q7aYsJpT9wTX7o74TXA93rQgHvEqDF 93hxIyxDdgnGpBgWiIBSrWH6XJ7AXTl6X5P/bvAJSO2kexM8Gy+PVqq0vxJF/HcFlVcAz8 pNP/EeYeZKJi1vkIxm61Ld40TffdDI3S8UtzRJ5JQDvlcqXM+0OvzAXC/O+qbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792518059; 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=7bFmdADfhrIAFc6KFH6z4NhqGk4hJ4qKUzNkRnymvck=; b=DinXmL7PuD+lB2j0Ga/OBalWbJkH1BW2nXiP7YDKMt3nXHwTqt4g0qBh0/m7j2kc2/WrbO 13PMwW6Czwqzn1eGuIXwxN9HYXnLwSE+piJkOrEJYaDaicg0FBHYSbPouJQREKCjm6s26m nQLyNsqsadx0YKqaw0q5U/CIFu7Lh2bSCBCuXWHb9S7Q17h0eWV6wZgxEHvUVH2FvhFdOA nxAtJofXX1WJrYIT88PYh1hMu8+wmLevr8UrwNxgGf2ltjZ+HWtH2f3AYV0yCipgVcYwN3 GeQ0ncvtORi+XNqkhQrCVYGbK0y1P4Xo1du6cdlHgDE9HUEXyKFTN49WRhWWKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4j8KT70D2pzHvD for ; Tue, 20 Oct 2026 17:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27844 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 20 Oct 2026 17:40:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: ec1754a677a0 - main - diff: diff regular files when `-q` is specified again List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: Commit messages for the main branch of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec1754a677a0bebb735d752583ad625150114eee Auto-Submitted: auto-generated Date: Tue, 20 Oct 2026 17:40:59 +0000 Message-Id: <6ad7a7ab.27844.1b5e6588@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=ec1754a677a0bebb735d752583ad625150114eee commit ec1754a677a0bebb735d752583ad625150114eee Author: Enji Cooper AuthorDate: 2026-10-20 17:37:12 +0000 Commit: Enji Cooper CommitDate: 2026-10-20 17:40:47 +0000 diff: diff regular files when `-q` is specified again c30a321a61ce accidentally modified the code paths when diffing regular files to not diff them if `-q` was specified. Call `diffreg(..)` again, regardless of whether or not `-q` was specified to restore the functionality pre-c30a321a61ce, while only printing out the result to the console if `-q` is not specified. This change unbreaks diff so 2 files which differ are reported again via the exit code when with `-q` is specified. MFC after: 3 days PR: 299643 Reviewed by: des Differential Revision: https://reviews.freebsd.org/D60910 Fixes: c30a321a61ce ("diff: support -qq to output absolutely nothing") --- usr.bin/diff/diff.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/diff/diff.c b/usr.bin/diff/diff.c index cf3e4ec1f11a..501a1f6ef0f8 100644 --- a/usr.bin/diff/diff.c +++ b/usr.bin/diff/diff.c @@ -139,7 +139,7 @@ main(int argc, char **argv) { const char *errstr; char **oargv; - int ch, dflags, lastch, gotstdin, prevoptind, newarg; + int ch, dflags, error, lastch, gotstdin, prevoptind, newarg; oargv = argv; gotstdin = 0; @@ -480,9 +480,9 @@ main(int argc, char **argv) err(2, "%s", argv[1]); } + error = diffreg(argv[0], argv[1], dflags, 1); if (diff_format != D_QUIET) - print_status(diffreg(argv[0], argv[1], dflags, 1), - argv[0], argv[1], ""); + print_status(error, argv[0], argv[1], ""); } if (fflush(stdout) != 0) err(2, "stdout");