←back to thread

I see a future in jj

(steveklabnik.com)
295 points steveklabnik | 4 comments | | HN request time: 0.843s | source
Show context
oefrha ◴[] No.45677124[source]
I gave jj two honest tries. While first class conflicts is a cool idea, in practice I deal with staging/committing 30x more than conflict resolution, and coming from magit, using jj’s hunk split & select felt like being thrown into stone age. Plus I rebase a lot and get a lot of jj’s benefits from magit’s various rebase shortcuts already, IIRC first class conflicts was the only truly novel thing I didn’t have. For people like me who stage/commit often and judiciously I don’t think jj will beat magit until its hunk selection UX comes close.
replies(6): >>45677310 #>>45677775 #>>45678027 #>>45678524 #>>45678766 #>>45679013 #
1. dcre ◴[] No.45677775[source]
I’m curious what the magit hunk selection UX consists in. I couldn’t find any videos showing something substantially different from the one built into jj — the videos I found were meant as beginner intros.

I’ve never used magit but I used GitUp (https://gitup.co/) for years before jj. I don’t find the jj one super natural, but I feel like that’s mostly a matter of keyboard shortcuts — I need to see if they can be customized.

replies(1): >>45677955 #
2. chrchr ◴[] No.45677955[source]
There's more than one way to do it, but the very normal UX is that you can just scroll through the diff file-by-file and stage/stash/drop each hunk individually by placing your cursor over it and issuing the appropriate command. You can do the same with files, staging/stashing/dropping changes to a file by placing the cursor on its name and issuing a command.
replies(1): >>45678423 #
3. aardvark179 ◴[] No.45678423[source]
Crucially you can also select a region within a chunk and perform those commands, so it’s easy to untangle changes.
replies(1): >>45679331 #
4. 1718627440 ◴[] No.45679331{3}[source]
And you can even edit the content you stage, so that you can stage something different, than what is in the working tree. Having different content in the index vs. working tree is the feature of the index, which I think JJ just doesn't support?