Skip to content

FR: Inspect obslog as patches #7

Open

Description

@jscarrott

Is your feature request related to a problem? Please describe.
When viewing the obslog I find it much easier to view the change the the previous commit as opposed to the previous change. Using jj directly you can do jj obslog -p.

Describe the solution you'd like
An option when viewing a obslog to switch to patch mode

Describe alternatives you've considered
I wrote a fzf script myself to do this before I realised vjj was a thing.

Additional context
It's actually pretty awkward to do as there isn't an easy way in the jj cli to get the previous commit id. In my quick script I had to get a hashmap of the commits and use the index to work out the immediate ancestor and then call interdiff.

Activity

  1. noahmayr commented on Apr 29, 2024

    @noahmayr
    Owner

    I'm not sure if I understand it correctly, do you want to view the diff between the focused commit in the obslog and the visible commit of that same change or between the previous/next hidden commit of that change?

    The first seems doable (preview jj interdiff --from <change id of the obslog> --to <focused commit id>) but not the diff between the previous/next commit of the obslog probably won't work since even if I could somehow obtain the id of the "previous" commit, the obslog is not guaranteed to be linear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions