Skip to content

[Feature Request] merge-base comparison for working tree against specific ref #589

@KEY60228

Description

@KEY60228

Problem

Currently, when comparing a single revision against the working tree (e.g., :DiffviewOpen origin/main), it shows all differences between that revision and the current working tree. However, I want to see only the changes they've made since their branch diverged from the target branch. While the triple-dot syntax (origin/main...HEAD) provides this functionality for committed changes, it doesn't include uncommitted changes in the working tree.

Proposed Solution

Add a --merge-base flag that modifies the behavior when comparing a single revision with the working tree:

:DiffviewOpen --merge-base origin/main

Use Cases

  • Pre-PR review: See all changes (committed and uncommitted) that will be included in a pull request
  • Feature branch development: Understand the full scope of changes on a feature branch relative to its base
  • Clean diffs: Avoid seeing unrelated changes that exist in the target branch but not in the merge-base

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