martinvonz / jj

A Git-compatible VCS that is both simple and powerful
https://martinvonz.github.io/jj/
Apache License 2.0
7.27k stars 240 forks source link

FR: Use `-p`/`--path` everywhere for path arguments #3809

Open arxanas opened 1 month ago

arxanas commented 1 month ago

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 because jj 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

Describe alternatives you've considered

Additional context N/A

yuja commented 1 month ago

For reference, there's a previous discussion in https://github.com/martinvonz/jj/issues/2554