-
Notifications
You must be signed in to change notification settings - Fork 323
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: Use -p
/--path
everywhere for path arguments
#3809
Comments
For reference, there's a previous discussion in #2554 |
For If file names are no longer given special treatment for the To be explicit, rather than having a |
Is your feature request related to a problem? Please describe.
I am constantly running
jj log <rev>
and then it silently doesn't work/hangs becausejj
is busy trying to find paths that match<rev>
in the commit history. This is a common footgun and we've implemented a few checks to try to detect path arguments that look like revset arguments, but it continues to happen.There's not a fundamental reason why paths are "more important" than revsets for most commands, so we should stop treating them as a "default" kind of argument for most (if not all) commands.
I believe a lot of the path arguments are positional primarily for historical reasons (namely, Git and Mercurial did it that way).
Describe the solution you'd like
-p
/--path
should also be accepted.-p
/--path
.Describe alternatives you've considered
git log --patch -- <path>
will limit the shown diff to only the parts touching the provided paths. I'm not sure if jj does anything similar at present.-p
is that you can't use the shell's globbing functionality.--path={foo,bar,baz}
to accomplish a similar workflow (as it will then expand to--path=foo --path=bar --path=baz
).--paths
(plural) argument that accepts any number of subsequent arguments is justifiable.Additional context
N/A
The text was updated successfully, but these errors were encountered: