From unknown Sat Sep 13 15:36:20 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#79372 <79372@debbugs.gnu.org> To: bug#79372 <79372@debbugs.gnu.org> Subject: Status: bug report: cannot `sdiff -o` using temporary streams as input Reply-To: bug#79372 <79372@debbugs.gnu.org> Date: Sat, 13 Sep 2025 22:36:20 +0000 retitle 79372 bug report: cannot `sdiff -o` using temporary streams as input reassign 79372 diffutils submitter 79372 Byron Hawkins severity 79372 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 02 14:00:47 2025 Received: (at submit) by debbugs.gnu.org; 2 Sep 2025 18:00:47 +0000 Received: from localhost ([127.0.0.1]:36519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1utVJH-0004xV-0M for submit@debbugs.gnu.org; Tue, 02 Sep 2025 14:00:47 -0400 Received: from lists.gnu.org ([2001:470:142::17]:60848) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1utUgr-00033d-CL for submit@debbugs.gnu.org; Tue, 02 Sep 2025 13:21:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utUgj-0006ZT-MH for bug-diffutils@gnu.org; Tue, 02 Sep 2025 13:20:57 -0400 Received: from mail-oa1-x31.google.com ([2001:4860:4864:20::31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utUgh-0001FD-NX for bug-diffutils@gnu.org; Tue, 02 Sep 2025 13:20:57 -0400 Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-30cce534a91so2026906fac.0 for ; Tue, 02 Sep 2025 10:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756833653; x=1757438453; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=3Je+lQgLSJlna2v3wt4ZuUs5fnJM8y4OtHdeIxBrl8c=; b=bGnWYmADdREKYnHqYXxvM3V7kL/x4/Q6whL7F15C4dvXG6kTpA971j9XS//oIbRYWq enXlhtYccA1nutF+1Otf3EXSoxe9Ae5YrdP6sFMhe6sOH2QhXz/PzwS+XiRKYiyE4rEk szbNP7OyzNAMxF0Xp0hQs+JcgJPB3iL0C2CifOruWtuHMLXsiDYAJNPBV/p+ts57N2HL aY8a41I1q0yS+g4L3LizmgAf64HIMkxxpuvCjZS1+7bME8dhHqX1lZNHR+ubd9mbwn50 LLSlyUPSQNkiP2bdr8hRn0QMboBgHm+NZM9noxDEmcC3ojNw7kHhoAqbGdn7MFPLlNhe 2Ynw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756833653; x=1757438453; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=3Je+lQgLSJlna2v3wt4ZuUs5fnJM8y4OtHdeIxBrl8c=; b=NrcRQezfBDIQ1/pZOw5CySoC2a2PsF6jb1VsvU+1LnP2xaHYIJAuVCx+/qt41ztzqn l1SFKXn/fHtIFBiy0rVxdVbZL5Q5lBPi8fImAQbA0QPVBEQVLYeiXVUdcugilLoyPA91 iPcyqx42kZrWg8bens6DTc+S8rhIQ7qWKwY4PgP0kc1cjavOpRCC8BbTcx8hUsKjXz9R uvwiirbNWPpsCHlOrtxVwrHqyZ0tUZBgyRJSiR2HJzVmx2WOJkKkG012GavamJmAEf5e EuKmsfTp7WG/zhRdXKtf5w/fybDMQAeQuwhUZHf0KX7Rb2O4iWXby+7csZTYW8SiMxyj Vrhg== X-Gm-Message-State: AOJu0YxPL1mG8VF3V2vnRcBZMUAN1nDM1cTxUUvhwCVYWuh4jIrN3YNz 6SiX1MObIX6SaP1MdVZF9abQRt6SS/H/2oUD9tFlfs1RsTphcPwR4eLXJT6YNhGq1mP/1T8Zdqn 4eihJf52FBORRzSvwLjyV5KsOi+ZuweQy56IlGHU= X-Gm-Gg: ASbGncs/z2FREw7qaKnh9vS00OXnM30N5p52Gbg+BEaq1eO5tH1J1gNBECMSwqY2s2u bSwq6UvQZt4VvDDakwZlvUTHtMLS/4FLsBy7oZOpqcBrh/3ygEPGoCI720J32kNGCZN6PdFZSNS OU2N95bK86/imptB7JUcU6iCc3bYrIt/UaCMJsjUtp2jtnZRsMbIwGRt2TlQZMnDLA65UL3PcNM TIhv4QAcr9uXVOxUw== X-Google-Smtp-Source: AGHT+IGbRwf/7HtbZbaSvJ/0wLrQ7irkV1p7w9kunz3yzStkQ2Lqt4kezuen49RIQH7iwxs3RFNpFfhKXlBSSFvKBy4= X-Received: by 2002:a05:6871:3686:b0:314:b6a6:6871 with SMTP id 586e51a60fabf-31963483d34mr5691167fac.51.1756833652622; Tue, 02 Sep 2025 10:20:52 -0700 (PDT) MIME-Version: 1.0 From: Byron Hawkins Date: Tue, 2 Sep 2025 19:20:40 +0200 X-Gm-Features: Ac12FXwCWmxfvf3l5-1k5Q-5H-zYTvWxWqh9S8SCBdd_Y2ayWcGPPSUGK_TInoU Message-ID: Subject: bug report: cannot `sdiff -o` using temporary streams as input To: bug-diffutils@gnu.org Content-Type: multipart/alternative; boundary="000000000000cb4a2f063dd4b59e" Received-SPF: pass client-ip=2001:4860:4864:20::31; envelope-from=byron.c.hawkins@gmail.com; helo=mail-oa1-x31.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 02 Sep 2025 14:00:45 -0400 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: -0.0 (/) --000000000000cb4a2f063dd4b59e Content-Type: text/plain; charset="UTF-8" ---- general info > sdiff --version sdiff (GNU diffutils) 3.12 Copyright (C) 2025 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later < https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Thomas Lord. > uname -a Linux prism 6.15.5-200.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Jul 6 09:16:17 UTC 2025 x86_64 GNU/Linux ----- bug report It is not possible to use the `-o` option of sdiff with a temporary input stream. While sdiff does walk through the merge process correctly under the following command, if the user ever selects "2" for a chunk having lines not appearing in "1",sdiff fails to copy those lines into the `-o` file. sdiff -o merge.txt local.txt <(ssh $remote "cat remote.txt") Input file contents: local.txt: line 1 line 2 line 4 remote.txt: line 1 line 2 line 3 line 4 Merge sequence: sdiff proposes a merge on line 3, with blank on the left and "line 3" on the right. User chooses "2". Expected content of merge.txt: line 1 line 2 line 3 line 4 Actual content of merge.txt: line 1 line 2 line 4 Perhaps sdiff is going back to the file a second time when applying the user's merge choice? In that case, it would seem the input stream is not available for repeated access. If this is not supported, could that fact please be documented? --000000000000cb4a2f063dd4b59e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
---- general info

> sdiff --version
sdiff (GNU diffutils) 3.12
Copyright (C) 2025 = Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or late= r <https://gnu.org/license= s/gpl.html>.
This is free software: you are free to change and re= distribute it.
There is NO WARRANTY, to the extent permitted by law.
=
Written by Thomas Lord.

> uname= -a
Linux prism 6.15.5-200.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC= Sun Jul =C2=A06 09:16:17 UTC 2025 x86_64 GNU/Linux

----- bug report

It is not possi= ble to use the `-o` option of sdiff with a temporary input stream. While sd= iff does walk through the merge process correctly under the=C2=A0following = command, if the user ever selects "2" for a chunk having lines no= t appearing in "1",sdiff fails to copy those lines into the `-o` = file.=C2=A0

=C2=A0 =C2=A0 sdiff -o merge.t= xt local.txt <(ssh $remote "cat remote.txt")
<= br>
Input file contents:

l= ocal.txt:
line 1
line 2
line 4

remote.txt:
line 1
line 2
line 3
line 4

Merge sequence: sdiff proposes a merge on line=C2=A03, with blank= on the left and "line 3" on the right. User chooses "2"= ;.

Expected content of merge.txt:
line 1
line 2
line 3
line 4

Actual content=C2=A0

of merge.txt:
line 1
line 2
line 4

Perhaps sdi= ff is going back to the file a second time when applying the user's mer= ge choice? In that case, it would seem the input stream is not available fo= r repeated access. If this is not supported, could that fact please be docu= mented?
--000000000000cb4a2f063dd4b59e--