<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[I&#x27;ve run into an interesting problem that I believe doesn&#x27;t have a well-known solution.]]></title><description><![CDATA[<p>I've run into an interesting problem that I believe doesn't have a well-known solution.</p><p>Given a diff file, compute a derived diff file which only removes/adds lines that match a regular expression, leaving non-matching lines unchanged. </p><p>I would appreciate suggestions/advice! </p><p>If I solve it myself, I'll write a blog post.</p>]]></description><link>https://board.circlewithadot.net/topic/141e2863-abb2-4d7c-a470-6094b83d4004/i-ve-run-into-an-interesting-problem-that-i-believe-doesn-t-have-a-well-known-solution.</link><generator>RSS for Node</generator><lastBuildDate>Fri, 01 May 2026 13:11:14 GMT</lastBuildDate><atom:link href="https://board.circlewithadot.net/topic/141e2863-abb2-4d7c-a470-6094b83d4004.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 19 Apr 2026 22:47:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to I&#x27;ve run into an interesting problem that I believe doesn&#x27;t have a well-known solution. on Mon, 20 Apr 2026 07:50:10 GMT]]></title><description><![CDATA[<p><span><a href="/user/krans%40mastodon.me.uk">@<span>krans</span></a></span> Thinking of your example, surely that's not automatically decideable?</p><p>context1<br />-irrelevant1<br />-old<br />+new<br />+irrelevant2<br />context2</p><p>Should the output become<br />context1<br />irrelevant1<br />new<br />irrelevant2<br />context2 </p><p>or</p><p>context1<br />new<br />irrelevant1<br />irrelevant2<br />context2<br />?</p><p>or any other potential resultant output?</p>]]></description><link>https://board.circlewithadot.net/post/https://infosec.exchange/users/dascandy/statuses/116435937539045119</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://infosec.exchange/users/dascandy/statuses/116435937539045119</guid><dc:creator><![CDATA[dascandy@infosec.exchange]]></dc:creator><pubDate>Mon, 20 Apr 2026 07:50:10 GMT</pubDate></item><item><title><![CDATA[Reply to I&#x27;ve run into an interesting problem that I believe doesn&#x27;t have a well-known solution. on Mon, 20 Apr 2026 07:11:10 GMT]]></title><description><![CDATA[<p><span><a href="/user/krans%40mastodon.me.uk">@<span>krans</span></a></span> Right, that's not a thing regexes can do. I was expecting something to be wrong still but couldn't quite find what. I'm also somewhat sure the header lines would be wrong in counts, which is also not fixable in regex.</p><p>Best of luck!</p>]]></description><link>https://board.circlewithadot.net/post/https://infosec.exchange/users/dascandy/statuses/116435784206842504</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://infosec.exchange/users/dascandy/statuses/116435784206842504</guid><dc:creator><![CDATA[dascandy@infosec.exchange]]></dc:creator><pubDate>Mon, 20 Apr 2026 07:11:10 GMT</pubDate></item><item><title><![CDATA[Reply to I&#x27;ve run into an interesting problem that I believe doesn&#x27;t have a well-known solution. on Mon, 20 Apr 2026 06:29:28 GMT]]></title><description><![CDATA[<p><span><a href="/user/dascandy%40infosec.exchange">@<span>dascandy</span></a></span> Context lines need to be reordered. Consider:</p><p> context1<br />-old<br />-irrelevant1<br />+new<br />+irrelevant2<br /> context2</p><p>The positions of the "irrelevant1" and "new" lines in the diff have to be swapped.</p>]]></description><link>https://board.circlewithadot.net/post/https://mastodon.me.uk/users/krans/statuses/116435620235305457</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://mastodon.me.uk/users/krans/statuses/116435620235305457</guid><dc:creator><![CDATA[krans@mastodon.me.uk]]></dc:creator><pubDate>Mon, 20 Apr 2026 06:29:28 GMT</pubDate></item><item><title><![CDATA[Reply to I&#x27;ve run into an interesting problem that I believe doesn&#x27;t have a well-known solution. on Mon, 20 Apr 2026 06:27:22 GMT]]></title><description><![CDATA[<p><span><a href="/user/krans%40mastodon.me.uk">@<span>krans</span></a></span> 2nd regex does do that? That's why I prefix the !KeEp to those you want to keep, so I can then remove the +/- from the rest. Should replace with space though, lemme fix that</p>]]></description><link>https://board.circlewithadot.net/post/https://infosec.exchange/users/dascandy/statuses/116435611996731284</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://infosec.exchange/users/dascandy/statuses/116435611996731284</guid><dc:creator><![CDATA[dascandy@infosec.exchange]]></dc:creator><pubDate>Mon, 20 Apr 2026 06:27:22 GMT</pubDate></item><item><title><![CDATA[Reply to I&#x27;ve run into an interesting problem that I believe doesn&#x27;t have a well-known solution. on Mon, 20 Apr 2026 06:26:54 GMT]]></title><description><![CDATA[<p><span><a href="/user/krans%40mastodon.me.uk">@<span>krans</span></a></span> I did kinda expect that and yeah, that context is unregexable</p>]]></description><link>https://board.circlewithadot.net/post/https://infosec.exchange/users/dascandy/statuses/116435610157171985</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://infosec.exchange/users/dascandy/statuses/116435610157171985</guid><dc:creator><![CDATA[dascandy@infosec.exchange]]></dc:creator><pubDate>Mon, 20 Apr 2026 06:26:54 GMT</pubDate></item><item><title><![CDATA[Reply to I&#x27;ve run into an interesting problem that I believe doesn&#x27;t have a well-known solution. on Mon, 20 Apr 2026 06:24:32 GMT]]></title><description><![CDATA[<p><span><a href="/user/dascandy%40infosec.exchange">@<span>dascandy</span></a></span> (I tried this already)</p>]]></description><link>https://board.circlewithadot.net/post/https://mastodon.me.uk/users/krans/statuses/116435600810296098</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://mastodon.me.uk/users/krans/statuses/116435600810296098</guid><dc:creator><![CDATA[krans@mastodon.me.uk]]></dc:creator><pubDate>Mon, 20 Apr 2026 06:24:32 GMT</pubDate></item><item><title><![CDATA[Reply to I&#x27;ve run into an interesting problem that I believe doesn&#x27;t have a well-known solution. on Mon, 20 Apr 2026 06:24:01 GMT]]></title><description><![CDATA[<p><span><a href="/user/dascandy%40infosec.exchange">@<span>dascandy</span></a></span> This creates patches that don't apply, because non-matching deletion lines must be converted into context lines.</p>]]></description><link>https://board.circlewithadot.net/post/https://mastodon.me.uk/users/krans/statuses/116435598806045387</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://mastodon.me.uk/users/krans/statuses/116435598806045387</guid><dc:creator><![CDATA[krans@mastodon.me.uk]]></dc:creator><pubDate>Mon, 20 Apr 2026 06:24:01 GMT</pubDate></item><item><title><![CDATA[Reply to I&#x27;ve run into an interesting problem that I believe doesn&#x27;t have a well-known solution. on Mon, 20 Apr 2026 06:22:49 GMT]]></title><description><![CDATA[<p><span><a href="/user/krans%40mastodon.me.uk">@<span>krans</span></a></span> </p><p>s/^[+-].*regex/!KeEp&amp;/<br />s/^[+-]/ /<br />s/!KeEp//</p><p>?</p>]]></description><link>https://board.circlewithadot.net/post/https://infosec.exchange/users/dascandy/statuses/116435594093690945</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://infosec.exchange/users/dascandy/statuses/116435594093690945</guid><dc:creator><![CDATA[dascandy@infosec.exchange]]></dc:creator><pubDate>Mon, 20 Apr 2026 06:22:49 GMT</pubDate></item><item><title><![CDATA[Reply to I&#x27;ve run into an interesting problem that I believe doesn&#x27;t have a well-known solution. on Mon, 20 Apr 2026 05:59:11 GMT]]></title><description><![CDATA[<p><span><a href="https://mastodon.me.uk/@mag">@<span>mag</span></a></span> I'm changing the wording in a log message and there are about 1500 tests affected. </p><p>Ooh, that is potentially *exactly* what I need — if the files I needed to update were in a git repository.</p>]]></description><link>https://board.circlewithadot.net/post/https://mastodon.me.uk/users/krans/statuses/116435501125944985</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://mastodon.me.uk/users/krans/statuses/116435501125944985</guid><dc:creator><![CDATA[krans@mastodon.me.uk]]></dc:creator><pubDate>Mon, 20 Apr 2026 05:59:11 GMT</pubDate></item><item><title><![CDATA[Reply to I&#x27;ve run into an interesting problem that I believe doesn&#x27;t have a well-known solution. on Sun, 19 Apr 2026 23:03:38 GMT]]></title><description><![CDATA[<p><span><a href="/user/krans%40mastodon.me.uk">@<span>krans</span></a></span> what's your use case for this? The closest I've come across in the past is using `EDITOR=&lt;some sed command&gt; git add -e &lt;file&gt;` to prevent +/- lines that don't match a regex from being committed.</p>]]></description><link>https://board.circlewithadot.net/post/https://mastodon.me.uk/users/mag/statuses/116433867155107161</link><guid isPermaLink="true">https://board.circlewithadot.net/post/https://mastodon.me.uk/users/mag/statuses/116433867155107161</guid><dc:creator><![CDATA[mag@mastodon.me.uk]]></dc:creator><pubDate>Sun, 19 Apr 2026 23:03:38 GMT</pubDate></item></channel></rss>