Urgent.News

What's breaking now, across thousands of outlets.

Tech

What "undo" actually means when the target is a real repo, not a fixture

Falsifier, stated before anything else Here's the claim this post makes, and here's exactly how to prove it wrong. Claim: a tool we built ( gx ) can take a real, public git repository, make a change to it through two different storage adapters, prove the change happened, undo it, and verify both the change and the undo (offline, in a separate process), and the whole four-stage walk finishes in…

The claim made in the post asserts that a tool called "gx" can change a real, public Git repository, prove the change, undo it, and verify both the change and the undo offline, all within under 30 seconds. To disprove this claim, we cloned the github.com/stevemao/left-pad repository at commit 2fca615 and ran the four-stage walk on both the Git substrate and the file system (fs) substrate.

If any stage failed, the wall-clock for either substrate's four stages exceeded 30 seconds, if the Git walk altered the worktree bytes of README.md, or if undo did not restore the exact pre-change SHA256 and HEAD, the claim would be incorrect. We ran the demonstration three times, and the results are shown in the table below.

The key observation is that, on the Git substrate, "committing a change" moves HEAD and creates a new blob in the object database without touching the bytes in the working tree. The file status shows as "M README.md," indicating a modified file in the index/HEAD but the file bytes remain unchanged on disk. This is in contrast to the fs substrate, where committing a change directly rewrites the bytes on disk.

The demo script utilizes separate string templates for each substrate, ensuring accurate reporting of the respective actions.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

JavaScript Find in Page: DOM Text Above the Codename One Canvas

Browser search cannot find pixels. That was the JavaScript port's text model: Codename One drew each glyph onto a canvas, so a visible label was invisible to find-in-page, text selection, and ordinary…

  • JavaScript port of Codename One faces canvas rendering limitations
  • PR #5552 promotes visible text to DOM layer for better browser handling
  • New DOM structure maintains focus, selection, and accessibility features

More from Sunday 30 August →