Skip to content
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

FR: jj split has confusing behavior when given a revision #4084

Open
mkeeter opened this issue Jul 14, 2024 · 3 comments
Open

FR: jj split has confusing behavior when given a revision #4084

mkeeter opened this issue Jul 14, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@mkeeter
Copy link

mkeeter commented Jul 14, 2024

Is your feature request related to a problem? Please describe.
I occasionally try to split a non-head commit with something like jj split rswnmnyv. This is not the right way to use jj split - the trailing arguments should be paths – but it doesn't produce an error; instead it goes ahead splits the current commit.

Describe the solution you'd like
jj split should produce an error when given a nonexistent path. For bonus points, if the path looks like a revision, it should print a message to that effect (e.g. something like To specify a revset, pass -r "rswnmnyv" instead).

@joyously
Copy link

This sounds similar to #1155 which references several other issues.
Also, an issue about squash changing: #3981.

@martinvonz
Copy link
Member

FWIW, we already print a warning like this:

Warning: No changes have been selected, so the first commit will be empty

@mkeeter
Copy link
Author

mkeeter commented Feb 20, 2025

Interesting – I've never noticed that warning, because my editor opens immediately and covers it up 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants