Hacker Newsnew | past | comments | ask | show | jobs | submit | Filligree's commentslogin

Yet another reason to use Jujutsu. And put a `jj status` wrapper in your PS1. ;-)

> Yet another reason to use Jujutsu

And what would that reason be? You can git revert a git revert.


You're correct for an actual git revert, but it seems pretty clear that the original authors have mangled the story and it was actually either a "git checkout" or "git reset". The "file where 1-2 hours of progress had been accumulating" phrasing only makes sense if those were uncommitted changes.

And the reason jj helps in that case is that for jj there is no such thing as an uncommitted change.


Also JJ undo is there and easy to tell the model to use, I have it in my Claude.md

surely Claude is much better at using git because of the massive training data difference.

If it didn't undo git, it would do it with JJ either.


It does fine with jj. Sometimes better, because jj is much easier to use non-interactively.

Having no such thing as an uncommitted change seems like it would be a nightmare, but perhaps I'm just too git-oriented.

> Having no such thing as an uncommitted change seems like it would be a nightmare, but perhaps I'm just too git-oriented.

Why? What's the problem you see? The only problem I see is when you let these extra commits pollute the history reachable from any branch you care about.

Let's look at the following:

Internally, 'git stash' consists of two operations: one that makes an 'anonymous' commit of your files, and another that resets those files to whatever they were in HEAD. (That commit is anonymous in the sense that no branch points at it.)

The git libraries expose the two operations separately. And you can build something yourself that works similarly.

You can use these capabilities to build an undo/redo log in git, but without polluting any of the history you care about.

To be honest, I have no clue how Jujutsu does it. They might be using a totally different design.


> perhaps I'm just too git-oriented.

The problem is git's index let's you write a bunch of unconnected code, then commit it separately. To different branches, even! This works great for stacking diffs but is terribly confusing if you don't know what you're doing.


Well, git doesn't really commit 'to' a branch.

You just build commits, and then later on you muck around with the mutable pointers that are branches.


Things like the index become a workflow pattern, rather than a feature, if that makes any sense.

Probably it actually ran git checkout or reset. As you say git revert only operates on committed snapshots so it will all be in the reflog

Yes, this exact scenario has happened to me a couple times with both Claude and Codex, and it's usually git checkout, more rarely git reset. They immediately realize they fucked up and spend a few minutes trying to undo by throwing random git commands at it until eventually giving up.

Yeap - this is why when running it in a dev container, I just use ZFS and set up a 1 minute auto-snapshot - which is set up as root - so it generally cannot blow it away. And cc/codex/gemini know how to deal with zfs snapshots to revert from them.

Of course if you give an agentic loop root access in yolo mode - then I am not sure how to help...


Start with env args like AGENT_ID for indicating which Merkle hash of which model(s) generated which code with which agent(s) and add those attributes to signed (-S) commit messages. For traceability; to find other faulty code generated by the same model and determine whether an agent or a human introduced the fault.

Then, `git notes` is better for signature metadata because it doesn't change the commit hash to add signatures for the commit.

And then, you'd need to run a local Rekor log to use Sigstore attestations on every commit.

Sigstore.dev is SLSA.dev compliant.

Sigstore grants short-lived release attestation signing keys for CI builds on a build farm to sign artifacts with.

So, when jujutsu autocommits agent-generated code, what causes there to be an {{AGENT_ID}} in the commit message or git notes? And what stops a user from forging such attestations?


- "Diffwatch – Watch AI agents touch the FS and see diffs live" (2025) https://news.ycombinator.com/item?id=45786382 :

> you can manually stage against @-: [with jujutsu]


It's not going to happen...

Stop spamming


The feature of "there is no such thing as an uncommitted working directory" is very relevant to the situation.

It's not. There are so many ways to just solve this non issue that no one will just switch to just another random tool.

Especially not away from git.


> It's not

Given that other posts solved the problem by scripting this feature on top of git, I guess you're telling them their solution isn't relevant too.


It's about switching your whole ecosystem to a complete different thing...

This is funny. I tried it once and didn't see what the benefit was. Then, when I tried to reset it back to normal git, I realized that the devs had not (at the time) made any clean way to revert it back, just a one-way conversion to jj. I haven't tried it since.

What were you trying to “revert back”? You should have been able to just stop using jj, there’s nothing to revert back to. It’s also possible that I’m misunderstanding what you mean.

Jujutsu doesn’t change your Git repository in incompatible ways. It just tracks extra information in the .jj/ directory. There is zero migration needed to revert back to Git – you just start using Git again.

Here in Ireland, night-time power prices are much lower than daytime.

I’m happy enough that a battery will serve me equally well in both modes, but there’s definitely going to be a period where all it does is support self-consumption.


The utility side has found that vaporising short circuits is a useful feature, as that includes e.g. twigs hitting a power line.

There are breakers, of course, but they react slowly enough that there will absolutely be a massive overdraw first. Then the breaker will open. Then, some small number of seconds later, it will automatically close.

It will attempt this two to four times before locking out, in case it just needs multiple bursts. It’s called “burning clear”, and it looks just as scary as you’d think… but it does work.

So, solar suppliers need to also survive this.


Prompt-hijacking is unlikely. GP is most likely trying to prevent mistakes, not malicious behavior.

By that metric, doctors doing triage at a disaster site should be jailed.

This is even more out of touch of the comment you are answering to.

> Why? Why currently prevents you from being more efficient and streaming your display from the cloud?

Latency. 120ms extra latency makes many games uncomfortable, and some of them entirely unplayable.


It isn’t, of course, but people who say so generally get tarred as lunatics of one brand or another.

The CEOs? You can’t get to those positions without a lot of luck and a skewed sense of probability.


It's hard for me to imagine how machine learning Nobel Prize laureate Geoffrey Hinton, someone who is openly warning about extinction risk from AI, is some insane crank on the topic of... machine learning.

Same goes for Turing Award winner Yoshua Bengio, AI tech CEOs Dario Amodei, Sam Altman, Elon Musk, etc. who have all said this technology could literally murder everyone.

What are we even doing here?


Oh don’t get me started. I have a friend who jumped on that scene…

Well, six years after he bought it the bike’s frame cracked in half as he was parking it. Somehow he avoided that happening in traffic.


There’s no way my proxy binary actually requires 25GB of code, or even the 3GB it is. Sounds to me like the answer is a tree shaker.


Google implemented the C++ equivalent of a tree shaker in their build system around 2009.


the front-end services to be "fast" AFAIK probably include nearly all the services you need to avoid hops -- so you can't really shake that much away.


Would be unpleasant, but asphyxiating from gradual CO2 increase isn’t really possible unless you’re dead drunk.

Your body measures CO2 (not O2), and will escalate to full-blown panic will before it’s particularly dangerous. You’d leave on your own.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: