From unknown Tue Jun 24 03:24:18 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#19825 <19825@debbugs.gnu.org> To: bug#19825 <19825@debbugs.gnu.org> Subject: Status: unified output format, number of consecutive unaffected lines, and POSIX Reply-To: bug#19825 <19825@debbugs.gnu.org> Date: Tue, 24 Jun 2025 10:24:18 +0000 retitle 19825 unified output format, number of consecutive unaffected lines= , and POSIX reassign 19825 diffutils submitter 19825 Vincent Lefevre severity 19825 normal tag 19825 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 09 21:24:10 2015 Received: (at submit) by debbugs.gnu.org; 10 Feb 2015 02:24:10 +0000 Received: from localhost ([127.0.0.1]:38722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YL0Uj-0007Lh-Qe for submit@debbugs.gnu.org; Mon, 09 Feb 2015 21:24:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48706) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YL0Ui-0007LS-Ch for submit@debbugs.gnu.org; Mon, 09 Feb 2015 21:24:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YL0Uc-0005Bz-6Z for submit@debbugs.gnu.org; Mon, 09 Feb 2015 21:24:03 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42421) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YL0Uc-0005Bv-4c for submit@debbugs.gnu.org; Mon, 09 Feb 2015 21:24:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YL0Ub-00056l-84 for bug-diffutils@gnu.org; Mon, 09 Feb 2015 21:24:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YL0UX-0005BY-8X for bug-diffutils@gnu.org; Mon, 09 Feb 2015 21:24:01 -0500 Received: from ioooi.vinc17.net ([92.243.22.117]:53301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YL0UX-0005Ag-2M for bug-diffutils@gnu.org; Mon, 09 Feb 2015 21:23:57 -0500 Received: from smtp-xvii.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by ioooi.vinc17.net (Postfix) with ESMTPSA id BC16E32A; Tue, 10 Feb 2015 03:23:48 +0100 (CET) Received: by xvii.vinc17.org (Postfix, from userid 1000) id 7C92921A079; Tue, 10 Feb 2015 03:23:48 +0100 (CET) Date: Tue, 10 Feb 2015 03:23:48 +0100 From: Vincent Lefevre To: bug-diffutils@gnu.org Subject: unified output format, number of consecutive unaffected lines, and POSIX Message-ID: <20150210022348.GA19044@xvii.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6416-vl-r76280 (2015-02-04) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Concerning the unified output format, POSIX says in http://pubs.opengroup.org/onlinepubs/9699919799/utilities/diff.html "If -U n is specified, the output shall contain no more than n consecutive unaffected lines; and if the output contains an affected line and this line is adjacent to up to n consecutive unaffected lines in the corresponding file, the output shall contain these unaffected lines. -u shall act like -U3." but with GNU diff and n =3D 3, one can get up to 6 consecutive unaffected lines: @@ -1,14 +1,14 @@ 1 2 3 -4 +4b 5 6 7 8 9 10 -11 +11b 12 13 14 I actually think that the GNU diff behavior is better than POSIX. And it is quite strange that POSIX specifies something different because this format comes from GNU diff! I think that the GNU diff manual should say something about this difference. Or could this be regarded as a defect in POSIX? Note: I noticed this after seeing that Subversion's internal diff behaves again differently, with a behavior between GNU diff and POSIX: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D777479#17 --=20 Vincent Lef=E8vre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 10 01:49:44 2015 Received: (at 19825) by debbugs.gnu.org; 10 Feb 2015 06:49:44 +0000 Received: from localhost ([127.0.0.1]:38804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YL4dk-0006nt-FB for submit@debbugs.gnu.org; Tue, 10 Feb 2015 01:49:44 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:39482) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YL4di-0006nZ-Hg for 19825@debbugs.gnu.org; Tue, 10 Feb 2015 01:49:43 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 858D6A6005E; Mon, 9 Feb 2015 22:49:36 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 77AAL9yegxpM; Mon, 9 Feb 2015 22:49:36 -0800 (PST) Received: from [192.168.1.9] (pool-173-55-11-52.lsanca.fios.verizon.net [173.55.11.52]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 2D453A6005C; Mon, 9 Feb 2015 22:49:36 -0800 (PST) Message-ID: <54D9A9FF.7030202@cs.ucla.edu> Date: Mon, 09 Feb 2015 22:49:35 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Vincent Lefevre , 19825@debbugs.gnu.org Subject: Re: [bug-diffutils] bug#19825: unified output format, number of consecutive unaffected lines, and POSIX References: <20150210022348.GA19044@xvii.vinc17.org> In-Reply-To: <20150210022348.GA19044@xvii.vinc17.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 19825 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Vincent Lefevre wrote: > Or could this be regarded as a defect in POSIX? That's what I'd say, yes. POSIX was intended to codify GNU diff's behavior here, and it seems to have missed the corner case you describe. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 30 21:59:44 2016 Received: (at control) by debbugs.gnu.org; 1 May 2016 01:59:44 +0000 Received: from localhost ([127.0.0.1]:58921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awgff-0000CD-Tx for submit@debbugs.gnu.org; Sat, 30 Apr 2016 21:59:44 -0400 Received: from mail-ob0-f178.google.com ([209.85.214.178]:33095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awgfe-0000C1-E5 for control@debbugs.gnu.org; Sat, 30 Apr 2016 21:59:42 -0400 Received: by mail-ob0-f178.google.com with SMTP id x1so48759782obt.0 for ; Sat, 30 Apr 2016 18:59:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to; bh=7ROLAzZuPytzCCo0rIaY1T5ac2jkgnCVc7qQuvgxfdU=; b=zXq1n9s+tsdp7ALs+3pGdXAd+usZ8RXskIuEK2/Oozdli5V80b6/lxLlw6yXob9X1L wx6ZaAHgGXUr7YFRCOuICBS4WonNT0EfGNnFaGOxvBZ1BJLrMDAJHwSb7LxpY/lMgLFZ uEB8lk7WAhiTWfCvJXrq4zkdrvFoMRiDUl4jA6jvjCoWUJMrKe2Dq3z5OY/y22skLBvO 7llBIl77M6uYCUQo3yuGbj7RuYOuebETdBAPZML6nOs/QC/0cjmKP8P5x0/OsYPW7Rhr StDGlMmPMhUdh4V7H3YFt+p+uDw3Z+4k+VZnqixVw5ek3/X19bSRoHfrLYoKfcRMIRoQ 3cFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=7ROLAzZuPytzCCo0rIaY1T5ac2jkgnCVc7qQuvgxfdU=; b=VsTS9eHc2dy2MxMuEmxPbtLeebGKcJ8/+zGwIV7BhFCjgV4vBy1was/4hahDbyJnF/ UEwMDkHR+xfhrA4aTKUl7E9s2sP98YOrOyRkHZvV8NMU9qAA8Yx62Azg+ijyBgI5Ybzy Ab5yF7DBbHXESnVNXfxpDQ/0ze2eW1xFoHtonR4G59bPlVwGhlqK+aIHiK7hs3QkTehB KTmuQzyaXNmVSrpzKeSCNchHWPdor7OAwI4akif55sfL9brhJmF1EnQC8xFpU8nrQcNt PqwFad9joAjWF5TrkxVCRm7p5ZT3vBqfsUyUcRWk+q3PqeoC0ZiTA/raNA2cdbHtMFOp ncWQ== X-Gm-Message-State: AOPr4FX3qHT3vor9T69lJe0UWQqiihXGG2C0llazNyy8cSw+O1Q6n1eK2jB+osV6VVcThxQCxyyn9305aIkJiQ== X-Received: by 10.182.157.37 with SMTP id wj5mr12251364obb.71.1462067976915; Sat, 30 Apr 2016 18:59:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.175.193 with HTTP; Sat, 30 Apr 2016 18:59:16 -0700 (PDT) From: Jim Meyering Date: Sat, 30 Apr 2016 18:59:16 -0700 X-Google-Sender-Auth: ht8q4S64a0K2bQ4pHoy4lux7uG0 Message-ID: Subject: To: GNU bug tracker automated control server Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 19825 notabug close 19825 [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.178 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.214.178 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (meyering[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 2.0 BLANK_SUBJECT Subject is present but empty 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 19825 notabug close 19825 [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.178 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.214.178 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (meyering[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 2.0 BLANK_SUBJECT Subject is present but empty 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different tags 19825 notabug close 19825 From unknown Tue Jun 24 03:24:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 29 May 2016 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator