Skip to content

FR: Add a custom entry to the op log #8436

@andrewaylett

Description

@andrewaylett

Is your feature request related to a problem? Please describe.
When I'm mixing my use of jj and other tools, I sometimes want to reconcile milestones in the other tool with entries in the op log. For example, if I'm running a tool that's going to mutate files, I want to note when I start the tool and when it finishes — JetBrains IDE's local history has a similar feature, where they show tests passing and failing in the history view.

Creating separate commits for these operations isn't quite what I'm looking for, especially as the tool might create new commits as it runs :).

Describe the solution you'd like
A new sub-command, perhaps jj operation record, that creates an empty transaction with the provided description.

Describe alternatives you've considered
It looks like jj util exec doesn't snapshot, but if it did then jj util exec echo "Your description here" might be a way to achieve what I want. Although that would still only add an operation if there were changes to snapshot.

Additional context
I have an implementation that I'll push as a PR shortly. If the feature doesn't fit into the project roadmap then please don't worry about telling me — I have learned a lot by implementing it, and I had fun, so it's not "wasted effort".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions