top | item 43020765

(no title)

wsycharles0o | 1 year ago

I’m confused. Isn’t this exactly the same as git commands?

discuss

order

steveklabnik|1 year ago

Many jj commands share names with git commands, yes. That doesn't always mean they do the same exact thing. There's lots that are different too.

lgas|1 year ago

> That doesn't always mean they do the same exact thing. There's lots that are different too.

That's good. Gotta keep people on their toes.

ashu1461|1 year ago

What is that one popular use case which git does really bad and jj does good ?

ipaddr|1 year ago

Sounds like something ready for the mass population.

arxanas|1 year ago

It's a bit unfortunate because most of the listed commands are indeed equivalent to Git commands. To give an example of new capabilities, in Git, you can't do the equivalent of

    jj rebase -r 'mine() & diff_contains("TODO")' -d 'heads(@::)'
in any reasonable number of commands, which will

1) find all of the commits I authored with the string `TODO` in the diff

2) extract them from their locations in the commit graph

3) rebase all non-matching descendant commits onto their nearest unaffected ancestor commits

4) find the most recent work I'm doing on the current branch (topologically, the descendant commit of the current commit which has no descendants of its own, called a "head")

5) rebase all extracted commits onto that commit, while preserving the relative topological order and moving any branches.

Furthermore, any merge conflicts produced during the process are stored for later resolution; I don't have to resolve them until I'm ready to do so. (That kind of VCS workflow is not useful for some people, but it's incredibly useful for me.)

porridgeraisin|1 year ago

So you're taking every single TODO commit and rebasing it on top of current? Why would we do that?