-
Notifications
You must be signed in to change notification settings - Fork 373
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: Option to not commit transaction #2562
Comments
I think the best way of doing that would be with a global |
That.. actually solves all of my problems, and seems not patched on, that's great, yes |
jj util stale diff
and jj util stale status
This patch adds a global `--no-commit-transaction` flag that prevents publishing of most operations, including the ones created by `snapshot_working_copy()` and `finish_transaction()`. The operations are still created as usual. We may want to follow up with a `jj op publish/commit/adopt` command for publishing an operation that was not committed. Closes #2562
This patch adds a global `--no-commit-transaction` flag that prevents publishing of most operations, including the ones created by `snapshot_working_copy()` and `finish_transaction()`. The operations are still created as usual. We may want to follow up with a `jj op publish/commit/adopt` command for publishing an operation that was not committed. Closes #2562
This patch adds a global `--no-commit-transaction` flag that prevents publishing of most operations, including the ones created by `snapshot_working_copy()` and `finish_transaction()`. The operations are still created as usual. We may want to follow up with a `jj op publish/commit/adopt` command for publishing an operation that was not committed. Closes #2562
Is your feature request related to a problem? Please describe.
There are two points for this:
--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 run
git 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 withjj 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 byjj stale
when we enable external subcommandsAnother thing would be
jj util stale status
(jj stale status
? :) ) which is just likejj status
, but does not snapshot - the difference fromjj 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 thingjj status
would've shown if the snapshot did happen - except it shouldn'tThe text was updated successfully, but these errors were encountered: