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

jj squash xyz no longer warns that the revision was treated as a path #3981

Open
mhammond opened this issue Jun 27, 2024 · 3 comments
Open
Labels
🐛bug Something isn't working

Comments

@mhammond
Copy link

Description

Steps to Reproduce the Problem

  1. Execute jj squash {some_changeid} instead of the intended -r {some_change_id}

Expected Behavior

jj takes no action (assuming the changeid isn't also a valid path) and prints a warning warning: The argument "xw" is being interpreted as a path. To specify a revset, pass -r "xw" instead.

Actual Behavior

jj prints output which looks a lot like the command completed as intended.

jj 0.18.0

See also #3334 - that report is different, but there you can see how jj used to print this warning.

@PhilipMetzger PhilipMetzger added the 🐛bug Something isn't working label Jun 27, 2024
@yuja
Copy link
Collaborator

yuja commented Jun 28, 2024

This is caused by
#3602 (comment)

Maybe we'll need a different condition for the warning.

@arxanas
Copy link
Collaborator

arxanas commented Jun 29, 2024

I'll also again propose #3809 as a more principled workaround to resolve this issue, rather than adding the warning back in a few places in a whack-a-mole fashion

@emilazy
Copy link
Collaborator

emilazy commented Jun 29, 2024

+1 for principle – though I was actually going to suggest the opposite, always using -r for revisions. That avoids any glob issues and so many commands already use -r that I think it’d be an easy adjustment. Indeed, I feel like I only ever run into this kind of issue when I’m trying to second‐guess if this is one of the few commands that want revisions directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants