Skip to content

For "divergence from upstream" view, indicate which commits have changed #2931

@stefanhaller

Description

@stefanhaller

When we have the new divergence from upstream view, it will be useful to somehow indicate visually which corresponding commits of the left/right sections have identical patches.

Use case: you see that your branch has diverged, and you don't remember whether that's because you rebased it, or because your co-worker has. You open the divergence view, and see that the co-worker has rebased onto a newer master; this is easy to tell from the blue/green coloring of the upstream commits. The rest of the commits have corresponding commit subjects, but from this view you can't tell whether some of those commits have additional changes that either you or your co-worker have sneaked in.

I haven't thought very much about how to implement this, but git has this concept called patch-id which can be used to see if two diffs at different locations in the history graph are "the same". It won't work in cases where conflicts occurred during the rebase, but apart from that it should be a good indication of patch equivalence.

Unfortunately the --pretty=format option of git log doesn't seem to support outputting patch ids directly, so we'll either have to generate them ourselves from the diffs of the individual commits, or somehow make use of the git cherry command to generate the information.

I'm also not sure what's the best way to visually indicate the information; I'd think about something along the lines of "greying out" those commits that have a corresponding patch on the other side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions