-
Notifications
You must be signed in to change notification settings - Fork 365
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: jj st/status and other movement commands should also list child commit(s) if any exist #5265
Comments
I suppose the main reason to show the parent commit is that one common workflow is to squash changes into the immediate parent? Is there a workflow like that but for merging into a child? (I'm personally slightly in favor of this FR, but I'm curious to know if there's any concrete workflows it enables.) |
It's not exactly how I would explain my workflow, but compare
and
The thing with the squash workflow is that it's essentially recreating git's index, but with jj's "every change is already a part of a commit" mechanics there isn't really any need to. As an example of where I would want to see child commits would be when traversing a branch to add comments, alter formatting, or making some other such small/safe changes where editing in place makes more sense than the more cautious and compartmentalized approach of squashing in a big change from a new faux-index child (which I don't think is ever really necessary with jj to begin with). Since this is how I'm often working, I've already updated my config.toml to assume editing instead of making new branches when using [ui.movement]
edit = true Getting back to the example, I just So I guess the actual desired feature would be to list both parents and children on any command that changes which node in the commit tree is the working copy, namely Like the ui.movement.edit option I referenced above, this could be implemented as a config option for those of us who aren't into the whole child -> parent squash workflow. |
Oh, and since I don't plan around squashing as my default workflow, I will work in place without using a faux-index child. If I overrun my original commit description, I'll just |
Current functionality is that
jj st
lists the working copy as well as any parent commits. It seems prudent that it should also list child commits if any exist. This would be very helpful for absent-minded developers and when coming back to work after a substantial break: to be reminded that you are not at a leaf node.It's also the case that when performing an operation such as
jj new -B @
, the subsequent output states "Rebased N descendant commits". I think it would make sense to also explicitly list the usual details for all direct children (but not all descendants, asjj st
is useful for how concise it is).But at the very least I believe it only makes sense for
jj st
to list children as well as parents as default behavior. (Currently it will happily list all parent commits but no child commits.)The text was updated successfully, but these errors were encountered: