Open mhammond opened 5 days ago
This is caused by https://github.com/martinvonz/jj/pull/3602#discussion_r1584862457
Maybe we'll need a different condition for the warning.
I'll also again propose https://github.com/martinvonz/jj/issues/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
+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.
Description
Steps to Reproduce the Problem
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.