-
Notifications
You must be signed in to change notification settings - Fork 701
Description
Is your feature request related to a problem? Please describe.
There are two points for this:
- Some things, like startship or maybe the intellij plugin I was experimenting with, need to know the state of the jj repo constantly, and I don't want to snapshot the repo every second - I know in some situations that's fine, but often you want more control, especially in cases when editing .gitignore, etc
- I will never get over the auto-amend happenning on every single command including readonly ones, when often I feel like I don't need it.
--ignore-working-copy
could've helped (at least in log it does), but the whole point is that I want to see changes I just did but not amend them, leaving the repo stale until I run some meaningful command and not obsess over running diff/status every second making snapshots.
For now I often rungit status
andgit diff
(and also starship shows git numbers, but there are different numbers between untracked and staged which is wonky), but I'd love to use jj only.
Describe the solution you'd like
jj util stale diff [-r @]
- jj diff
but between the @ (or other) and the physical state of the files in working copy, --ignore-working-copy
(meaning no snapshot made) implied.
It is under the util subcommand (and not, say, jj diff --stale
) because it essentially is git staging, which I feel like you wouldn't want to have among first-class commands, this is an "advanced", "low-level-ish" feature (useful, again, in things like starship) - although if you're ok with jj diff --stale
, so am I.
Maaaybe there could be a jj stale [verb]
set of commands, which is "officially discouraged" as it goes against the amend-everything principle :)
Or maybe I'll write a jj-stale
program that will just do all of that and be unofficial, and could be called by jj stale
when we enable external subcommands
Another thing would be jj util stale status
(jj stale status
? :) ) which is just like jj status
, but does not snapshot - the difference from jj status --ignore-working-copy
is that here the latter ignores the stale changes (it just works with the wc commit which wasn't amended), the stale-status should show the same thing jj status
would've shown if the snapshot did happen - except it shouldn't