-
Notifications
You must be signed in to change notification settings - Fork 758
cli: -G as short version of --no-graph #7677
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
Conversation
4c26edc to
3a5721c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel like adding it to jj evolog too?
|
... and to |
3a5721c to
6806dfc
Compare
|
I think it would be very valuable to have Do you use See: |
|
I haven't realized This goes together with my understanding that In |
Agreed. But I think having this functionality available from short options is important; when running a number of searches in sequence to find a specific commit, it's pretty annoying to go from I do think this functionality is important enough to warrant a short flag for it, and I think that it would be slightly nicer, everything else equal, if the short flag were the same between Do you end up using |
It's only just been added in #7639. (So, now is a good time to discuss whether to keep it!) I expect to use it mainly when doing some automated processing on commits, e.g. You make some good points. I'm currently a bit under the weather, so I don't promise to think much more deeply right now about what the best compromise would be, but hopefully others are thinking about it as well. |
|
It's confusing that git only provides a short option name. What would be a good (long) name for these options, without looking at what git already did? We could also say we go for another short name for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's worth testing the short option. Since it relies on clap, there's no logic in our code that can go wrong. It seems very unlikely to regress. I don't think it's worth spending CPU testing it all the time. I don't know if others agree.
(I think the test you added for --no-graph in test_operations.rs is useful, however.)
That and the |
6806dfc to
245e053
Compare
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
|
@ilyagr @9999years Do you want to continue the discussion on the flag name in this PR? |
|
Are there any proposed standards for short flags or for |
245e053 to
32f2ebc
Compare
|
TLDR: I'm personally quite happy with this as is. I'm not 100% sure we have a full consensus on this. @9999years, how do you feel now (and in light of my thoughts below)?
I am personally happy with this PR as is. In my mind, One possibility for the latter would be to have flags like Even if that's not great, I'm hoping we can come up with something better than
In my mind, minus-capital-letter is a decent standard for this. We also often use these to suppress warnings or errors (e.g. However, we don't currently do this for any other |
Agreed. I suspect they had I would propose Perhaps simply |
|
(As an aside, it's a bit odd to have |
I think we should make it explicit that these operate on the diff and not the description, e.g. It's a tricky design space — I really do think that the revset functions are "the right way" to do this, but the quoting they introduce makes for poor ergonomics on the command-line. But then expressing all the options we want on the command-line introduces a combinatorial explosion of search subjects and modes. |
|
I've also opened an issue (rather than the discussion I opened previously) for this functionality: |
|
Sort of related: FR: --diff-filter equivalent in jj diff |
To be consistent with `jj log -G`.
32f2ebc to
041e6fa
Compare
To be consistent with
jj log -G.Checklist
If applicable:
CHANGELOG.mdREADME.md,docs/,demos/)cli/src/config-schema.json)