-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jj restore --to
is easy to mix up with jj restore --from
#5394
Comments
The idea of requiring I was also surprised recently that we haven't renamed P.S. Another possibility that came to my mind was |
Ah, I didn't even know there were
I think it would make sense to say:
Which would imply modifying I'll make a change to add |
Good point
I'm guessing this is a typo, you meant
It's an interactive version of
I'm going back and forth in my mind whether |
Oops, yes. I edited my message to avoid confusing other people.
I see. If the syntax was
There's no rush, I can wait a couple of days to see if others chime in before posting a pull request. |
Requiring
Sounds reasonable to me. |
As was mentioned in #5394, `jj restore`'s `--to` option can sound like it's about restoring the working copy to the specified state. Renaming it to `--into` should avoid such confusion.
This is a part of jj-vcs#5394.
This is a part of jj-vcs#5394.
This is a part of jj-vcs#5394.
This is a part of jj-vcs#5394.
This is a part of #5394.
When I want to reset the working copy to whatever some other revision contained, I frequently use both
jj restore --from x
andjj restore --to x
. Alas, the former is correct, but the latter creates crazy conflicts, untiljj undo
saves the day once again.I think the reason for my recurring confusion is that, in a sentence,
restore from
is clear but mostly used in "restore from backup" and similar phrasing, while "restore to" is more frequent and often means the same thing ("I restored the config to the previous version", "I restored the painting to its 18th century state").Anyway, maybe it's just me getting confused by this, or maybe there's nothing worth doing here, but I thought I'd bring it up just in case.
In terms of potential ways to change jj:
--src
and--dst
would be clearer, but I imagine a number of places use the--to
/--from
terminology, so probably a non starter--to
could be renamed--into
, but same problem as above--to
without--from
could be rejected. You'd have to write--from @
explicitly if that's what you mean (this operation seems very niche, so it seems fine to add a hurdle there)The text was updated successfully, but these errors were encountered: