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: Warn when revision is used without -r for diff and split #1538

Closed
tp-woven opened this issue Apr 20, 2023 · 3 comments
Closed

FR: Warn when revision is used without -r for diff and split #1538

tp-woven opened this issue Apr 20, 2023 · 3 comments

Comments

@tp-woven
Copy link
Contributor

Since diff and split default to -r @, it is easy to forget to add -r when using them for another revision. When this happens, jj treats the argument as a file name that usually doesn't match anything and proceeds to report and empty diff.

Instead, jj should show a warning when the pattern doesn't match any actual files, similar to log. Potentially, we could also (or instead) check whether the argument actually matches a revision first.

Related Discord discussion: https://discord.com/channels/968932220549103686/968932220549103689/1098397923819135036

@ilyagr
Copy link
Contributor

ilyagr commented Apr 20, 2023

I think the related #505 was the first issue I filed here. Since then, I started to think that the same approach as with jj log might be easier and equally effective.

@tp-woven
Copy link
Contributor Author

Thanks, I'll close this as a duplicate of #505 then.

@tp-woven tp-woven closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2023
@ilyagr
Copy link
Contributor

ilyagr commented Apr 20, 2023

OK, I'll change the name of that bug then to make it more general.

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

No branches or pull requests

2 participants